summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-01-06 20:13:22 +0100
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-01-10 19:32:52 +0100
commitcb2856c5971723910a86b7d1d0cf623d6919cbc4 (patch)
tree9b00ee9da24645404c8e40dd8034c14ccddf02f5 /fs/nfs/pnfs.c
parentNFS/pNFS: Don't leak DS commits in pnfs_generic_retry_commit() (diff)
downloadlinux-cb2856c5971723910a86b7d1d0cf623d6919cbc4.tar.xz
linux-cb2856c5971723910a86b7d1d0cf623d6919cbc4.zip
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/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c1
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;
}