diff options
Diffstat (limited to 'kernel/dev.c')
-rw-r--r-- | kernel/dev.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/kernel/dev.c b/kernel/dev.c index c783ead..2e081d0 100644 --- a/kernel/dev.c +++ b/kernel/dev.c @@ -433,33 +433,21 @@ static inline int copy_out_header(struct fuse_out_header *oh, const char *buf, return 0; } -#ifdef KERNEL_2_6 static int fuse_invalidate(struct fuse_conn *fc, struct fuse_user_header *uh) { - struct inode *inode = ilookup(fc->sb, uh->ino); + struct inode *inode = fuse_ilookup(fc, uh->ino, uh->nodeid); if (!inode) return -ENOENT; fuse_sync_inode(inode); +#ifdef KERNEL_2_6 invalidate_inode_pages(inode->i_mapping); +#else + invalidate_inode_pages(inode); +#endif + iput(inode); return 0; } -#else -static int fuse_invalidate(struct fuse_conn *fc, struct fuse_user_header *uh) -{ - struct inode *inode = iget(fc->sb, uh->ino); - int err = -ENOENT; - if (inode) { - if (INO_FI(inode)) { - fuse_sync_inode(inode); - invalidate_inode_pages(inode); - err = 0; - } - iput(inode); - } - return err; -} -#endif static int fuse_user_request(struct fuse_conn *fc, const char *buf, size_t nbytes) |