aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-04-02 15:37:02 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-04-03 18:29:10 -0400
commit44ea8dfce021db1db6a31970b1f13a80366a1f21 (patch)
tree1bd9a768c10e9d65b44bdd3462a1d4af24c44a2a /fs/nfs/nfs4proc.c
parentNFS/pnfs: Fix dereference of layout cred in pnfs_layoutcommit_inode() (diff)
downloadlinux-dev-44ea8dfce021db1db6a31970b1f13a80366a1f21.tar.xz
linux-dev-44ea8dfce021db1db6a31970b1f13a80366a1f21.zip
NFS/pnfs: Reference the layout cred in pnfs_prepare_layoutreturn()
When we're sending a layoutreturn, ensure that we reference the layout cred atomically with the copy of the stateid. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index e4f8311e506c..99e9f2ee7e7a 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -9297,6 +9297,7 @@ static void nfs4_layoutreturn_release(void *calldata)
lrp->ld_private.ops->free(&lrp->ld_private);
pnfs_put_layout_hdr(lrp->args.layout);
nfs_iput_and_deactive(lrp->inode);
+ put_cred(lrp->cred);
kfree(calldata);
dprintk("<-- %s\n", __func__);
}