diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-01-06 14:13:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-19 18:26:17 +0100 |
commit | 6b3ae2030db9a3ee058906a1be342a12684b6c4e (patch) | |
tree | 76b181673b73910366c7556fafb08fe5a2d0219e /fs | |
parent | aa2399f55eff4ec78330bb6fe55f9df53e5cae0c (diff) |
NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter
commit cb2856c5971723910a86b7d1d0cf623d6919cbc4 upstream.
If we exit _lgopen_prepare_attached() without setting a layout, we will
currently leak the plh_outstanding counter.
Fixes: 411ae722d10a ("pNFS: Wait for stale layoutget calls to complete in pnfs_update_layout()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/pnfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index daf55101e90e..4232f956bdac 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2215,6 +2215,7 @@ static void _lgopen_prepare_attached(struct nfs4_opendata *data, &rng, GFP_KERNEL); if (!lgp) { pnfs_clear_first_layoutget(lo); + nfs_layoutget_end(lo); pnfs_put_layout_hdr(lo); return; } |