diff options
author | Trond Myklebust | 2021-01-06 14:13:22 -0500 |
---|---|---|
committer | Trond Myklebust | 2021-01-10 13:32:52 -0500 |
commit | cb2856c5971723910a86b7d1d0cf623d6919cbc4 (patch) | |
tree | 9b00ee9da24645404c8e40dd8034c14ccddf02f5 /fs/nfs | |
parent | 46c9ea1d4fee4cf1f8cc6001b9c14aae61b3d502 (diff) |
NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter
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>
Diffstat (limited to 'fs/nfs')
-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 fc13a3c8bc48..4f274f21c4ab 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2244,6 +2244,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; } |