aboutsummaryrefslogtreecommitdiff
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-22 12:40:19 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 16:33:39 +0400
commit30d904947459cca2beb69e0110716f5248b31f2a (patch)
tree024e2a913266377d234147b14b7eb37017546173 /fs/9p/vfs_inode.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.c')
-rw-r--r--fs/9p/vfs_inode.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 62ce8daefa9..2b05651e0c3 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -858,12 +858,11 @@ error:
static int
v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
- struct opendata *od, unsigned flags, umode_t mode,
+ struct file *file, unsigned flags, umode_t mode,
int *opened)
{
int err;
u32 perm;
- struct file *filp;
struct v9fs_inode *v9inode;
struct v9fs_session_info *v9ses;
struct p9_fid *fid, *inode_fid;
@@ -880,7 +879,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
/* Only creates */
if (!(flags & O_CREAT) || dentry->d_inode) {
- finish_no_open(od, res);
+ finish_no_open(file, res);
return 1;
}
@@ -918,16 +917,14 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
v9inode->writeback_fid = (void *) inode_fid;
}
mutex_unlock(&v9inode->v_mutex);
- filp = finish_open(od, dentry, generic_file_open, opened);
- if (IS_ERR(filp)) {
- err = PTR_ERR(filp);
+ err = finish_open(file, dentry, generic_file_open, opened);
+ if (err)
goto error;
- }
- filp->private_data = fid;
+ file->private_data = fid;
#ifdef CONFIG_9P_FSCACHE
if (v9ses->cache)
- v9fs_cache_inode_set_cookie(dentry->d_inode, filp);
+ v9fs_cache_inode_set_cookie(dentry->d_inode, file);
#endif
*opened |= FILE_CREATED;