aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/cache.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-07-11 16:40:59 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 11:40:18 -0700
commite38b21e76bb89bba3e59da494de586aac23ad430 (patch)
tree79ac1f29f97ffafc6c31ba3a8dbffcc9c9462572 /fs/9p/cache.h
parenta0be78ef93e0656339bf14feddc0e8afb2a86894 (diff)
downloadkernel_samsung_espresso10-e38b21e76bb89bba3e59da494de586aac23ad430.zip
kernel_samsung_espresso10-e38b21e76bb89bba3e59da494de586aac23ad430.tar.gz
kernel_samsung_espresso10-e38b21e76bb89bba3e59da494de586aac23ad430.tar.bz2
fs/9p: When doing inode lookup compare qid details and inode mode bits.
commit fd2421f54423f307ecd31bdebdca6bc317e0c492 upstream. This make sure we don't use wrong inode from the inode hash. The inode number of the file deleted is reused by the next file system object created and if we only use inode number for inode hash lookup we could end up with wrong struct inode. Also compare inode generation number. Not all Linux file system provide st_gen in userspace. So it could be 0; Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/9p/cache.h')
-rw-r--r--fs/9p/cache.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/9p/cache.h b/fs/9p/cache.h
index 049507a..40cc54c 100644
--- a/fs/9p/cache.h
+++ b/fs/9p/cache.h
@@ -93,15 +93,6 @@ static inline void v9fs_uncache_page(struct inode *inode, struct page *page)
BUG_ON(PageFsCache(page));
}
-static inline void v9fs_fscache_set_key(struct inode *inode,
- struct p9_qid *qid)
-{
- struct v9fs_inode *v9inode = V9FS_I(inode);
- spin_lock(&v9inode->fscache_lock);
- v9inode->fscache_key = qid;
- spin_unlock(&v9inode->fscache_lock);
-}
-
static inline void v9fs_fscache_wait_on_page_write(struct inode *inode,
struct page *page)
{