diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-01-06 22:13:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-19 20:27:31 +0300 |
commit | 01a12a24f9238024f69ee0b15ffa73511ba6c95f (patch) | |
tree | 2c5515390fd123c36af9711e89967ed0415902ad /fs/nfs/pnfs.c | |
parent | b666f394d6b8858c579df5dbe906d59517d82889 (diff) | |
download | linux-01a12a24f9238024f69ee0b15ffa73511ba6c95f.tar.xz |
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 c1ad54b1096b..471bfa273dad 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2245,6 +2245,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; } |