aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode_dotl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-22 04:40:19 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:33:39 -0400
commit30d904947459cca2beb69e0110716f5248b31f2a (patch)
tree024e2a913266377d234147b14b7eb37017546173 /fs/9p/vfs_inode_dotl.c
parenta4a3bdd778715999ddfeefdc52ab76254580fa76 (diff)
kill struct opendata
Just pass struct file *. Methods are happier that way... There's no need to return struct file * from finish_open() now, so let it return int. Next: saner prototypes for parts in namei.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/vfs_inode_dotl.c')
-rw-r--r--fs/9p/vfs_inode_dotl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 69f05109f75d..cfaebdef9743 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -242,14 +242,13 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
242 242
243static int 243static int
244v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, 244v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
245 struct opendata *od, unsigned flags, umode_t omode, 245 struct file *file, unsigned flags, umode_t omode,
246 int *opened) 246 int *opened)
247{ 247{
248 int err = 0; 248 int err = 0;
249 gid_t gid; 249 gid_t gid;
250 umode_t mode; 250 umode_t mode;
251 char *name = NULL; 251 char *name = NULL;
252 struct file *filp;
253 struct p9_qid qid; 252 struct p9_qid qid;
254 struct inode *inode; 253 struct inode *inode;
255 struct p9_fid *fid = NULL; 254 struct p9_fid *fid = NULL;
@@ -270,7 +269,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
270 269
271 /* Only creates */ 270 /* Only creates */
272 if (!(flags & O_CREAT) || dentry->d_inode) { 271 if (!(flags & O_CREAT) || dentry->d_inode) {
273 finish_no_open(od, res); 272 finish_no_open(file, res);
274 return 1; 273 return 1;
275 } 274 }
276 275
@@ -357,15 +356,13 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
357 } 356 }
358 mutex_unlock(&v9inode->v_mutex); 357 mutex_unlock(&v9inode->v_mutex);
359 /* Since we are opening a file, assign the open fid to the file */ 358 /* Since we are opening a file, assign the open fid to the file */
360 filp = finish_open(od, dentry, generic_file_open, opened); 359 err = finish_open(file, dentry, generic_file_open, opened);
361 if (IS_ERR(filp)) { 360 if (err)
362 err = PTR_ERR(filp);
363 goto err_clunk_old_fid; 361 goto err_clunk_old_fid;
364 } 362 file->private_data = ofid;
365 filp->private_data = ofid;
366#ifdef CONFIG_9P_FSCACHE 363#ifdef CONFIG_9P_FSCACHE
367 if (v9ses->cache) 364 if (v9ses->cache)
368 v9fs_cache_inode_set_cookie(inode, filp); 365 v9fs_cache_inode_set_cookie(inode, file);
369#endif 366#endif
370 *opened |= FILE_CREATED; 367 *opened |= FILE_CREATED;
371out: 368out: