aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/inode.c8
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
577static struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, struct dentry *dentry, struct rpc_cred *cred) 577static 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;