fs/9p: Prevent parallel rename when doing fid_lookup
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 30 Jun 2010 13:48:50 +0000 (19:18 +0530)
committerEric Van Hensbergen <ericvh@gmail.com>
Mon, 2 Aug 2010 19:28:35 +0000 (14:28 -0500)
commita534c8d15b1f1d0f861fc2bb9e0529bd8486ec3f
tree0451da7a61bd7e3eb5968d65beee3243f7f51b5d
parentebf46264a004818fe5b23f0ac18ac7336897d807
fs/9p: Prevent parallel rename when doing fid_lookup

During fid lookup we need to make sure that the dentry->d_parent doesn't
change so that we can safely walk the parent dentries. To ensure that
we need to prevent cross directory rename during fid_lookup. Add a
per superblock rename_sem rw_semaphore to prevent parallel fid lookup and
rename.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
fs/9p/fid.c
fs/9p/v9fs.c
fs/9p/v9fs.h
fs/9p/vfs_inode.c
fs/9p/vfs_super.c