diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-22 18:40:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:43:44 -0400 |
commit | 3d4ff43d895c50319af45eb4bf04a4618eccdf76 (patch) | |
tree | b412cd076920a903a854a20bceed4a0ce511fd13 /fs/nfs/dir.c | |
parent | 82a2c1b77ada3b81911deeb871719ec5ff77f83c (diff) | |
download | linux-3d4ff43d895c50319af45eb4bf04a4618eccdf76.tar.gz linux-3d4ff43d895c50319af45eb4bf04a4618eccdf76.tar.bz2 linux-3d4ff43d895c50319af45eb4bf04a4618eccdf76.zip |
nfs_open_context doesn't need struct path either
just dentry, please...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index a86acd6d0cb4..a0693f3f11c0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1345,10 +1345,6 @@ static int is_atomic_open(struct nameidata *nd) static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *dentry, struct nameidata *nd) { - struct path path = { - .mnt = nd->path.mnt, - .dentry = dentry, - }; struct nfs_open_context *ctx; struct rpc_cred *cred; fmode_t fmode = nd->intent.open.flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC); @@ -1356,7 +1352,7 @@ static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *den cred = rpc_lookup_cred(); if (IS_ERR(cred)) return ERR_CAST(cred); - ctx = alloc_nfs_open_context(&path, cred, fmode); + ctx = alloc_nfs_open_context(dentry, cred, fmode); put_rpccred(cred); if (ctx == NULL) return ERR_PTR(-ENOMEM); @@ -1376,13 +1372,13 @@ static int nfs_intent_set_file(struct nameidata *nd, struct nfs_open_context *ct /* If the open_intent is for execute, we have an extra check to make */ if (ctx->mode & FMODE_EXEC) { - ret = nfs_may_open(ctx->path.dentry->d_inode, + ret = nfs_may_open(ctx->dentry->d_inode, ctx->cred, nd->intent.open.flags); if (ret < 0) goto out; } - filp = lookup_instantiate_filp(nd, ctx->path.dentry, do_open); + filp = lookup_instantiate_filp(nd, ctx->dentry, do_open); if (IS_ERR(filp)) ret = PTR_ERR(filp); else @@ -1463,8 +1459,8 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry res = d_add_unique(dentry, inode); nfs_unblock_sillyrename(dentry->d_parent); if (res != NULL) { - dput(ctx->path.dentry); - ctx->path.dentry = dget(res); + dput(ctx->dentry); + ctx->dentry = dget(res); dentry = res; } err = nfs_intent_set_file(nd, ctx); |