aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
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/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 = {
112#ifdef CONFIG_NFS_V4 112#ifdef CONFIG_NFS_V4
113 113
114static int nfs_atomic_open(struct inode *, struct dentry *, 114static int nfs_atomic_open(struct inode *, struct dentry *,
115 struct opendata *, unsigned, umode_t, 115 struct file *, unsigned, umode_t,
116 int *); 116 int *);
117const struct inode_operations nfs4_dir_inode_operations = { 117const struct inode_operations nfs4_dir_inode_operations = {
118 .create = nfs_create, 118 .create = nfs_create,
@@ -1389,10 +1389,9 @@ static int do_open(struct inode *inode, struct file *filp)
1389 1389
1390static int nfs_finish_open(struct nfs_open_context *ctx, 1390static int nfs_finish_open(struct nfs_open_context *ctx,
1391 struct dentry *dentry, 1391 struct dentry *dentry,
1392 struct opendata *od, unsigned open_flags, 1392 struct file *file, unsigned open_flags,
1393 int *opened) 1393 int *opened)
1394{ 1394{
1395 struct file *filp;
1396 int err; 1395 int err;
1397 1396
1398 if (ctx->dentry != dentry) { 1397 if (ctx->dentry != dentry) {
@@ -1407,13 +1406,10 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
1407 goto out; 1406 goto out;
1408 } 1407 }
1409 1408
1410 filp = finish_open(od, dentry, do_open, opened); 1409 err = finish_open(file, dentry, do_open, opened);
1411 if (IS_ERR(filp)) { 1410 if (err)
1412 err = PTR_ERR(filp);
1413 goto out; 1411 goto out;
1414 } 1412 nfs_file_set_open_context(file, ctx);
1415 nfs_file_set_open_context(filp, ctx);
1416 err = 0;
1417 1413
1418out: 1414out:
1419 put_nfs_open_context(ctx); 1415 put_nfs_open_context(ctx);
@@ -1421,7 +1417,7 @@ out:
1421} 1417}
1422 1418
1423static int nfs_atomic_open(struct inode *dir, struct dentry *dentry, 1419static int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
1424 struct opendata *od, unsigned open_flags, 1420 struct file *file, unsigned open_flags,
1425 umode_t mode, int *opened) 1421 umode_t mode, int *opened)
1426{ 1422{
1427 struct nfs_open_context *ctx; 1423 struct nfs_open_context *ctx;
@@ -1497,7 +1493,7 @@ static int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
1497 nfs_unblock_sillyrename(dentry->d_parent); 1493 nfs_unblock_sillyrename(dentry->d_parent);
1498 nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); 1494 nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
1499 1495
1500 err = nfs_finish_open(ctx, dentry, od, open_flags, opened); 1496 err = nfs_finish_open(ctx, dentry, file, open_flags, opened);
1501 1497
1502 dput(res); 1498 dput(res);
1503out: 1499out:
@@ -1509,7 +1505,7 @@ no_open:
1509 if (IS_ERR(res)) 1505 if (IS_ERR(res))
1510 goto out; 1506 goto out;
1511 1507
1512 finish_no_open(od, res); 1508 finish_no_open(file, res);
1513 return 1; 1509 return 1;
1514} 1510}
1515 1511