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:22:37 +0100 |
commit | b2f9fbbc3fa20f066e20f1d676175e4af0e177ba (patch) | |
tree | d57267a4bf7f654b076bd0f1855611f1215291d3 /fs/nfs/pnfs.c | |
parent | 87396ce3b5059916e81b6c3456a5c2b9b7636b5f (diff) | |
download | linux-stable-b2f9fbbc3fa20f066e20f1d676175e4af0e177ba.tar.gz linux-stable-b2f9fbbc3fa20f066e20f1d676175e4af0e177ba.tar.bz2 linux-stable-b2f9fbbc3fa20f066e20f1d676175e4af0e177ba.zip |
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/nfs/pnfs.c')
-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 d072fce917b8..46ca5592b8b0 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2147,6 +2147,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; } |