aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-03-08 06:09:46 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-22 16:43:35 -0400
commit5a7e0a8cf50cf905403f5a498e86d1f97cfcf51b (patch)
tree3f20f98db76f7a221f397630a03e6089c1208510 /fs/9p/v9fs.h
parentf741a79e982cf56d7584435bad663553ffe6715f (diff)
fs/9p: Fix race in initializing writeback fid
When two process open the same file we can end up with both of them allocating the writeback_fid. Add a new mutex which can be used for synchronizing v9fs_inode member values. 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>
Diffstat (limited to 'fs/9p/v9fs.h')
-rw-r--r--fs/9p/v9fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h
index bd8496db135b..89657e865162 100644
--- a/fs/9p/v9fs.h
+++ b/fs/9p/v9fs.h
@@ -130,6 +130,7 @@ struct v9fs_inode {
130#endif 130#endif
131 unsigned int cache_validity; 131 unsigned int cache_validity;
132 struct p9_fid *writeback_fid; 132 struct p9_fid *writeback_fid;
133 struct mutex v_mutex;
133 struct inode vfs_inode; 134 struct inode vfs_inode;
134}; 135};
135 136