diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-04-02 21:37:02 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-04-04 00:29:10 +0200 |
commit | 44ea8dfce021db1db6a31970b1f13a80366a1f21 (patch) | |
tree | 1bd9a768c10e9d65b44bdd3462a1d4af24c44a2a /fs/nfs/nfs4proc.c | |
parent | NFS/pnfs: Fix dereference of layout cred in pnfs_layoutcommit_inode() (diff) | |
download | linux-44ea8dfce021db1db6a31970b1f13a80366a1f21.tar.xz linux-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.c | 1 |
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__); } |