NFS: Don't return layout segments that are in use
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 5 Aug 2020 13:03:56 +0000 (09:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:24:15 +0000 (08:24 +0200)
commit983e638fd8583f38265780a18445c3f95cb19e78
tree142f63ba30e749b1be1578c911cfa3361262d8b7
parent36dafe0035debe1887967e4234458fa059a2a946
NFS: Don't return layout segments that are in use

commit d474f96104bd4377573526ebae2ee212205a6839 upstream.

If the NFS_LAYOUT_RETURN_REQUESTED flag is set, we want to return the
layout as soon as possible, meaning that the affected layout segments
should be marked as invalid, and should no longer be in use for I/O.

Fixes: f0b429819b5f ("pNFS: Ignore non-recalled layouts in pnfs_layout_need_return()")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pnfs.c