NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 6 Jan 2021 19:13:22 +0000 (14:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:31 +0000 (18:27 +0100)
commit01a12a24f9238024f69ee0b15ffa73511ba6c95f
tree2c5515390fd123c36af9711e89967ed0415902ad
parentb666f394d6b8858c579df5dbe906d59517d82889
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>
fs/nfs/pnfs.c