From f7cc02b8715618e179242ba9cc10bdc5146ae565 Mon Sep 17 00:00:00 2001 From: Yoshihisa Abe Date: Mon, 25 Oct 2010 02:03:45 -0400 Subject: Coda: push BKL regions into coda_upcall() Now that shared inode state is locked using the cii->c_lock, the BKL is only used to protect the upcall queues used to communicate with the userspace cache manager. The remaining state is all local and we can push the lock further down into coda_upcall(). Signed-off-by: Yoshihisa Abe Signed-off-by: Jan Harkes Signed-off-by: Linus Torvalds --- fs/coda/psdev.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'fs/coda/psdev.c') diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index fdc2f3ef7ecd..9a9248e632c6 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -108,16 +108,9 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, return -EFAULT; if (DOWNCALL(hdr.opcode)) { - struct super_block *sb = NULL; - union outputArgs *dcbuf; + union outputArgs *dcbuf; int size = sizeof(*dcbuf); - sb = vcp->vc_sb; - if ( !sb ) { - count = nbytes; - goto out; - } - if ( nbytes < sizeof(struct coda_out_hdr) ) { printk("coda_downcall opc %d uniq %d, not enough!\n", hdr.opcode, hdr.unique); @@ -137,9 +130,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, } /* what downcall errors does Venus handle ? */ - lock_kernel(); - error = coda_downcall(hdr.opcode, dcbuf, sb); - unlock_kernel(); + error = coda_downcall(vcp, hdr.opcode, dcbuf); CODA_FREE(dcbuf, nbytes); if (error) { -- cgit