aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/psdev.c
diff options
context:
space:
mode:
authorYoshihisa Abe <yoshiabe@cs.cmu.edu>2010-10-25 02:03:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 11:02:40 -0400
commitf7cc02b8715618e179242ba9cc10bdc5146ae565 (patch)
tree80c1bcf6923c9982a52fbe510cb7d396fb9866fc /fs/coda/psdev.c
parentb5ce1d83a62fc109d8e815b1fc71dcdb0d26bc49 (diff)
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 <yoshiabe@cs.cmu.edu> Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coda/psdev.c')
-rw-r--r--fs/coda/psdev.c13
1 files changed, 2 insertions, 11 deletions
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,
108 return -EFAULT; 108 return -EFAULT;
109 109
110 if (DOWNCALL(hdr.opcode)) { 110 if (DOWNCALL(hdr.opcode)) {
111 struct super_block *sb = NULL; 111 union outputArgs *dcbuf;
112 union outputArgs *dcbuf;
113 int size = sizeof(*dcbuf); 112 int size = sizeof(*dcbuf);
114 113
115 sb = vcp->vc_sb;
116 if ( !sb ) {
117 count = nbytes;
118 goto out;
119 }
120
121 if ( nbytes < sizeof(struct coda_out_hdr) ) { 114 if ( nbytes < sizeof(struct coda_out_hdr) ) {
122 printk("coda_downcall opc %d uniq %d, not enough!\n", 115 printk("coda_downcall opc %d uniq %d, not enough!\n",
123 hdr.opcode, hdr.unique); 116 hdr.opcode, hdr.unique);
@@ -137,9 +130,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
137 } 130 }
138 131
139 /* what downcall errors does Venus handle ? */ 132 /* what downcall errors does Venus handle ? */
140 lock_kernel(); 133 error = coda_downcall(vcp, hdr.opcode, dcbuf);
141 error = coda_downcall(hdr.opcode, dcbuf, sb);
142 unlock_kernel();
143 134
144 CODA_FREE(dcbuf, nbytes); 135 CODA_FREE(dcbuf, nbytes);
145 if (error) { 136 if (error) {