diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-01-30 13:44:07 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 14:07:56 -0500 |
commit | 6eae7974d0490a9dbc3091f702ea1650871652a9 (patch) | |
tree | 0882fbc397ee3b54d12a78b256354fc9f2b4cc96 | |
parent | 2096f759abcb42200a81d776f597362fd9265024 (diff) |
Switch alloc_nfs_open_context() to struct path
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/nfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index f141bde7756a..7570573bdb30 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -574,14 +574,14 @@ void nfs_close_context(struct nfs_open_context *ctx, int is_sync) | |||
574 | nfs_revalidate_inode(server, inode); | 574 | nfs_revalidate_inode(server, inode); |
575 | } | 575 | } |
576 | 576 | ||
577 | static struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, struct dentry *dentry, struct rpc_cred *cred) | 577 | static struct nfs_open_context *alloc_nfs_open_context(struct path *path, struct rpc_cred *cred) |
578 | { | 578 | { |
579 | struct nfs_open_context *ctx; | 579 | struct nfs_open_context *ctx; |
580 | 580 | ||
581 | ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); | 581 | ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); |
582 | if (ctx != NULL) { | 582 | if (ctx != NULL) { |
583 | ctx->path.dentry = dget(dentry); | 583 | ctx->path = *path; |
584 | ctx->path.mnt = mntget(mnt); | 584 | path_get(&ctx->path); |
585 | ctx->cred = get_rpccred(cred); | 585 | ctx->cred = get_rpccred(cred); |
586 | ctx->state = NULL; | 586 | ctx->state = NULL; |
587 | ctx->lockowner = current->files; | 587 | ctx->lockowner = current->files; |
@@ -686,7 +686,7 @@ int nfs_open(struct inode *inode, struct file *filp) | |||
686 | cred = rpc_lookup_cred(); | 686 | cred = rpc_lookup_cred(); |
687 | if (IS_ERR(cred)) | 687 | if (IS_ERR(cred)) |
688 | return PTR_ERR(cred); | 688 | return PTR_ERR(cred); |
689 | ctx = alloc_nfs_open_context(filp->f_path.mnt, filp->f_path.dentry, cred); | 689 | ctx = alloc_nfs_open_context(&filp->f_path, cred); |
690 | put_rpccred(cred); | 690 | put_rpccred(cred); |
691 | if (ctx == NULL) | 691 | if (ctx == NULL) |
692 | return -ENOMEM; | 692 | return -ENOMEM; |