aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode_dotl.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-02-28 06:34:03 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 10:57:39 -0400
commit6b39f6d22fbf67cf795c105b4d67c64e9c352ca4 (patch)
tree0d0926901486e334feb5422ee2b0e56b45e9a970 /fs/9p/vfs_inode_dotl.c
parenta78ce05d5d342297b66122eda8add4eefa21f8a8 (diff)
fs/9p: Move writeback fid to v9fs_inode
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/vfs_inode_dotl.c')
-rw-r--r--fs/9p/vfs_inode_dotl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 21523f27f5d1..984594123abe 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -159,16 +159,17 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
159 struct nameidata *nd) 159 struct nameidata *nd)
160{ 160{
161 int err = 0; 161 int err = 0;
162 char *name = NULL;
163 gid_t gid; 162 gid_t gid;
164 int flags; 163 int flags;
165 mode_t mode; 164 mode_t mode;
166 struct v9fs_session_info *v9ses; 165 char *name = NULL;
167 struct p9_fid *fid = NULL;
168 struct p9_fid *dfid, *ofid, *inode_fid;
169 struct file *filp; 166 struct file *filp;
170 struct p9_qid qid; 167 struct p9_qid qid;
171 struct inode *inode; 168 struct inode *inode;
169 struct p9_fid *fid = NULL;
170 struct v9fs_inode *v9inode;
171 struct p9_fid *dfid, *ofid, *inode_fid;
172 struct v9fs_session_info *v9ses;
172 struct posix_acl *pacl = NULL, *dacl = NULL; 173 struct posix_acl *pacl = NULL, *dacl = NULL;
173 174
174 v9ses = v9fs_inode2v9ses(dir); 175 v9ses = v9fs_inode2v9ses(dir);
@@ -241,9 +242,11 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
241 242
242 /* Now set the ACL based on the default value */ 243 /* Now set the ACL based on the default value */
243 v9fs_set_create_acl(dentry, dacl, pacl); 244 v9fs_set_create_acl(dentry, dacl, pacl);
244 if (v9ses->cache && !inode->i_private) { 245
246 v9inode = V9FS_I(inode);
247 if (v9ses->cache && !v9inode->writeback_fid) {
245 /* 248 /*
246 * clone a fid and add it to inode->i_private 249 * clone a fid and add it to writeback_fid
247 * we do it during open time instead of 250 * we do it during open time instead of
248 * page dirty time via write_begin/page_mkwrite 251 * page dirty time via write_begin/page_mkwrite
249 * because we want write after unlink usecase 252 * because we want write after unlink usecase
@@ -254,7 +257,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
254 err = PTR_ERR(inode_fid); 257 err = PTR_ERR(inode_fid);
255 goto error; 258 goto error;
256 } 259 }
257 inode->i_private = (void *) inode_fid; 260 v9inode->writeback_fid = (void *) inode_fid;
258 } 261 }
259 /* Since we are opening a file, assign the open fid to the file */ 262 /* Since we are opening a file, assign the open fid to the file */
260 filp = lookup_instantiate_filp(nd, dentry, generic_file_open); 263 filp = lookup_instantiate_filp(nd, dentry, generic_file_open);