aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-07-11 12:40:59 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2011-07-23 10:32:48 -0400
commitfd2421f54423f307ecd31bdebdca6bc317e0c492 (patch)
tree6e681349c6111a6bca9a562090bdedfd5b2ed29c /fs/9p/v9fs.c
parent5034990e28efb2d232ee82443a9edd62defd17ba (diff)
fs/9p: When doing inode lookup compare qid details and inode mode bits.
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>
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r--fs/9p/v9fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index c82b017f51f3..8b7c6be2450b 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -487,8 +487,8 @@ static void v9fs_inode_init_once(void *foo)
487 struct v9fs_inode *v9inode = (struct v9fs_inode *)foo; 487 struct v9fs_inode *v9inode = (struct v9fs_inode *)foo;
488#ifdef CONFIG_9P_FSCACHE 488#ifdef CONFIG_9P_FSCACHE
489 v9inode->fscache = NULL; 489 v9inode->fscache = NULL;
490 v9inode->fscache_key = NULL;
491#endif 490#endif
491 memset(&v9inode->qid, 0, sizeof(v9inode->qid));
492 inode_init_once(&v9inode->vfs_inode); 492 inode_init_once(&v9inode->vfs_inode);
493} 493}
494 494