NFS/pnfs: Bulk destroy of layouts needs to be safe w.r.t. umount
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 22 Feb 2019 19:20:27 +0000 (14:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:27 +0000 (14:50 +0100)
commit8ce3c27633f1bd0b9c3c466953e98f070ba2bc62
tree9820c78b04525c21a8a16d2370bd929f4125e16d
parent02c0351094568b3234cdadcec6a01c185ab026e5
NFS/pnfs: Bulk destroy of layouts needs to be safe w.r.t. umount

[ Upstream commit 5085607d209102b37b169bc94d0aa39566a9842a ]

If a bulk layout recall or a metadata server reboot coincides with a
umount, then holding a reference to an inode is unsafe unless we
also hold a reference to the super block.

Fixes: fd9a8d7160937 ("NFSv4.1: Fix bulk recall and destroy of layouts")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/pnfs.c
fs/nfs/pnfs.h