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)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 12 Aug 2020 13:46:06 +0000 (09:46 -0400)
commitd474f96104bd4377573526ebae2ee212205a6839
tree30c6b8c6050de9fb4fd8f063941943f4a0a83649
parentff041727e9e029845857cac41aae118ead5e261b
NFS: Don't return layout segments that are in use

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>
fs/nfs/pnfs.c