diff options
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/inode.c | 8 | ||||
-rw-r--r-- | fs/coda/psdev.c | 12 | ||||
-rw-r--r-- | fs/coda/upcall.c | 12 |
3 files changed, 17 insertions, 15 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index d97f9935a028..6526e6f21ecf 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "coda_int.h" | 35 | #include "coda_int.h" |
36 | 36 | ||
37 | /* VFS super_block ops */ | 37 | /* VFS super_block ops */ |
38 | static void coda_clear_inode(struct inode *); | 38 | static void coda_evict_inode(struct inode *); |
39 | static void coda_put_super(struct super_block *); | 39 | static void coda_put_super(struct super_block *); |
40 | static int coda_statfs(struct dentry *dentry, struct kstatfs *buf); | 40 | static int coda_statfs(struct dentry *dentry, struct kstatfs *buf); |
41 | 41 | ||
@@ -93,7 +93,7 @@ static const struct super_operations coda_super_operations = | |||
93 | { | 93 | { |
94 | .alloc_inode = coda_alloc_inode, | 94 | .alloc_inode = coda_alloc_inode, |
95 | .destroy_inode = coda_destroy_inode, | 95 | .destroy_inode = coda_destroy_inode, |
96 | .clear_inode = coda_clear_inode, | 96 | .evict_inode = coda_evict_inode, |
97 | .put_super = coda_put_super, | 97 | .put_super = coda_put_super, |
98 | .statfs = coda_statfs, | 98 | .statfs = coda_statfs, |
99 | .remount_fs = coda_remount, | 99 | .remount_fs = coda_remount, |
@@ -224,8 +224,10 @@ static void coda_put_super(struct super_block *sb) | |||
224 | printk("Coda: Bye bye.\n"); | 224 | printk("Coda: Bye bye.\n"); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void coda_clear_inode(struct inode *inode) | 227 | static void coda_evict_inode(struct inode *inode) |
228 | { | 228 | { |
229 | truncate_inode_pages(&inode->i_data, 0); | ||
230 | end_writeback(inode); | ||
229 | coda_cache_clear_inode(inode); | 231 | coda_cache_clear_inode(inode); |
230 | } | 232 | } |
231 | 233 | ||
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index 66b9cf79c5ba..de89645777c7 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -177,7 +177,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, | |||
177 | nbytes = req->uc_outSize; /* don't have more space! */ | 177 | nbytes = req->uc_outSize; /* don't have more space! */ |
178 | } | 178 | } |
179 | if (copy_from_user(req->uc_data, buf, nbytes)) { | 179 | if (copy_from_user(req->uc_data, buf, nbytes)) { |
180 | req->uc_flags |= REQ_ABORT; | 180 | req->uc_flags |= CODA_REQ_ABORT; |
181 | wake_up(&req->uc_sleep); | 181 | wake_up(&req->uc_sleep); |
182 | retval = -EFAULT; | 182 | retval = -EFAULT; |
183 | goto out; | 183 | goto out; |
@@ -254,8 +254,8 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf, | |||
254 | retval = -EFAULT; | 254 | retval = -EFAULT; |
255 | 255 | ||
256 | /* If request was not a signal, enqueue and don't free */ | 256 | /* If request was not a signal, enqueue and don't free */ |
257 | if (!(req->uc_flags & REQ_ASYNC)) { | 257 | if (!(req->uc_flags & CODA_REQ_ASYNC)) { |
258 | req->uc_flags |= REQ_READ; | 258 | req->uc_flags |= CODA_REQ_READ; |
259 | list_add_tail(&(req->uc_chain), &vcp->vc_processing); | 259 | list_add_tail(&(req->uc_chain), &vcp->vc_processing); |
260 | goto out; | 260 | goto out; |
261 | } | 261 | } |
@@ -315,19 +315,19 @@ static int coda_psdev_release(struct inode * inode, struct file * file) | |||
315 | list_del(&req->uc_chain); | 315 | list_del(&req->uc_chain); |
316 | 316 | ||
317 | /* Async requests need to be freed here */ | 317 | /* Async requests need to be freed here */ |
318 | if (req->uc_flags & REQ_ASYNC) { | 318 | if (req->uc_flags & CODA_REQ_ASYNC) { |
319 | CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); | 319 | CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); |
320 | kfree(req); | 320 | kfree(req); |
321 | continue; | 321 | continue; |
322 | } | 322 | } |
323 | req->uc_flags |= REQ_ABORT; | 323 | req->uc_flags |= CODA_REQ_ABORT; |
324 | wake_up(&req->uc_sleep); | 324 | wake_up(&req->uc_sleep); |
325 | } | 325 | } |
326 | 326 | ||
327 | list_for_each_entry_safe(req, tmp, &vcp->vc_processing, uc_chain) { | 327 | list_for_each_entry_safe(req, tmp, &vcp->vc_processing, uc_chain) { |
328 | list_del(&req->uc_chain); | 328 | list_del(&req->uc_chain); |
329 | 329 | ||
330 | req->uc_flags |= REQ_ABORT; | 330 | req->uc_flags |= CODA_REQ_ABORT; |
331 | wake_up(&req->uc_sleep); | 331 | wake_up(&req->uc_sleep); |
332 | } | 332 | } |
333 | 333 | ||
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index f09c5ed76f6c..b8893ab6f9e6 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c | |||
@@ -604,7 +604,7 @@ static void coda_unblock_signals(sigset_t *old) | |||
604 | (((r)->uc_opcode != CODA_CLOSE && \ | 604 | (((r)->uc_opcode != CODA_CLOSE && \ |
605 | (r)->uc_opcode != CODA_STORE && \ | 605 | (r)->uc_opcode != CODA_STORE && \ |
606 | (r)->uc_opcode != CODA_RELEASE) || \ | 606 | (r)->uc_opcode != CODA_RELEASE) || \ |
607 | (r)->uc_flags & REQ_READ)) | 607 | (r)->uc_flags & CODA_REQ_READ)) |
608 | 608 | ||
609 | static inline void coda_waitfor_upcall(struct upc_req *req) | 609 | static inline void coda_waitfor_upcall(struct upc_req *req) |
610 | { | 610 | { |
@@ -624,7 +624,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req) | |||
624 | set_current_state(TASK_UNINTERRUPTIBLE); | 624 | set_current_state(TASK_UNINTERRUPTIBLE); |
625 | 625 | ||
626 | /* got a reply */ | 626 | /* got a reply */ |
627 | if (req->uc_flags & (REQ_WRITE | REQ_ABORT)) | 627 | if (req->uc_flags & (CODA_REQ_WRITE | CODA_REQ_ABORT)) |
628 | break; | 628 | break; |
629 | 629 | ||
630 | if (blocked && time_after(jiffies, timeout) && | 630 | if (blocked && time_after(jiffies, timeout) && |
@@ -708,7 +708,7 @@ static int coda_upcall(struct venus_comm *vcp, | |||
708 | coda_waitfor_upcall(req); | 708 | coda_waitfor_upcall(req); |
709 | 709 | ||
710 | /* Op went through, interrupt or not... */ | 710 | /* Op went through, interrupt or not... */ |
711 | if (req->uc_flags & REQ_WRITE) { | 711 | if (req->uc_flags & CODA_REQ_WRITE) { |
712 | out = (union outputArgs *)req->uc_data; | 712 | out = (union outputArgs *)req->uc_data; |
713 | /* here we map positive Venus errors to kernel errors */ | 713 | /* here we map positive Venus errors to kernel errors */ |
714 | error = -out->oh.result; | 714 | error = -out->oh.result; |
@@ -717,13 +717,13 @@ static int coda_upcall(struct venus_comm *vcp, | |||
717 | } | 717 | } |
718 | 718 | ||
719 | error = -EINTR; | 719 | error = -EINTR; |
720 | if ((req->uc_flags & REQ_ABORT) || !signal_pending(current)) { | 720 | if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) { |
721 | printk(KERN_WARNING "coda: Unexpected interruption.\n"); | 721 | printk(KERN_WARNING "coda: Unexpected interruption.\n"); |
722 | goto exit; | 722 | goto exit; |
723 | } | 723 | } |
724 | 724 | ||
725 | /* Interrupted before venus read it. */ | 725 | /* Interrupted before venus read it. */ |
726 | if (!(req->uc_flags & REQ_READ)) | 726 | if (!(req->uc_flags & CODA_REQ_READ)) |
727 | goto exit; | 727 | goto exit; |
728 | 728 | ||
729 | /* Venus saw the upcall, make sure we can send interrupt signal */ | 729 | /* Venus saw the upcall, make sure we can send interrupt signal */ |
@@ -747,7 +747,7 @@ static int coda_upcall(struct venus_comm *vcp, | |||
747 | sig_inputArgs->ih.opcode = CODA_SIGNAL; | 747 | sig_inputArgs->ih.opcode = CODA_SIGNAL; |
748 | sig_inputArgs->ih.unique = req->uc_unique; | 748 | sig_inputArgs->ih.unique = req->uc_unique; |
749 | 749 | ||
750 | sig_req->uc_flags = REQ_ASYNC; | 750 | sig_req->uc_flags = CODA_REQ_ASYNC; |
751 | sig_req->uc_opcode = sig_inputArgs->ih.opcode; | 751 | sig_req->uc_opcode = sig_inputArgs->ih.opcode; |
752 | sig_req->uc_unique = sig_inputArgs->ih.unique; | 752 | sig_req->uc_unique = sig_inputArgs->ih.unique; |
753 | sig_req->uc_inSize = sizeof(struct coda_in_hdr); | 753 | sig_req->uc_inSize = sizeof(struct coda_in_hdr); |