pNFS: Prevent the layout header refcount going to zero in pnfs_roc()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 7 Mar 2018 19:49:06 +0000 (14:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 09:54:27 +0000 (10:54 +0100)
commite131a6d68cd5271c72ef36ad539509d3863f78cb
treecba6ca13a801b022ccdbe4915ff527e708e278bd
parent2bca2c58d83bd8eb38ff2c125d15eaceb8a36d54
pNFS: Prevent the layout header refcount going to zero in pnfs_roc()

commit 9c6376ebddad585da4238532dd6d90ae23ffee67 upstream.

Ensure that we hold a reference to the layout header when processing
the pNFS return-on-close so that the refcount value does not inadvertently
go to zero.

Reported-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # v4.10+
Tested-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pnfs.c