summaryrefslogtreecommitdiff
path: root/fs/nfs
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/nfs
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/nfs')
-rw-r--r--fs/nfs/dir.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index b56f4b36ed41..dafc86c1c35e 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -112,7 +112,7 @@ const struct inode_operations nfs3_dir_inode_operations = {
#ifdef CONFIG_NFS_V4
static int nfs_atomic_open(struct inode *, struct dentry *,
- struct opendata *, unsigned, umode_t,
+ struct file *, unsigned, umode_t,
int *);
const struct inode_operations nfs4_dir_inode_operations = {
.create = nfs_create,
@@ -1389,10 +1389,9 @@ static int do_open(struct inode *inode, struct file *filp)
static int nfs_finish_open(struct nfs_open_context *ctx,
struct dentry *dentry,
- struct opendata *od, unsigned open_flags,
+ struct file *file, unsigned open_flags,
int *opened)
{
- struct file *filp;
int err;
if (ctx->dentry != dentry) {
@@ -1407,13 +1406,10 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
goto out;
}
- filp = finish_open(od, dentry, do_open, opened);
- if (IS_ERR(filp)) {
- err = PTR_ERR(filp);
+ err = finish_open(file, dentry, do_open, opened);
+ if (err)
goto out;
- }
- nfs_file_set_open_context(filp, ctx);
- err = 0;
+ nfs_file_set_open_context(file, ctx);
out:
put_nfs_open_context(ctx);
@@ -1421,7 +1417,7 @@ out:
}
static int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
- struct opendata *od, unsigned open_flags,
+ struct file *file, unsigned open_flags,
umode_t mode, int *opened)
{
struct nfs_open_context *ctx;
@@ -1497,7 +1493,7 @@ static int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
nfs_unblock_sillyrename(dentry->d_parent);
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
- err = nfs_finish_open(ctx, dentry, od, open_flags, opened);
+ err = nfs_finish_open(ctx, dentry, file, open_flags, opened);
dput(res);
out:
@@ -1509,7 +1505,7 @@ no_open:
if (IS_ERR(res))
goto out;
- finish_no_open(od, res);
+ finish_no_open(file, res);
return 1;
}