NFS: Don't discard pNFS layout segments that are marked for return
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 15 Apr 2021 19:41:57 +0000 (15:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:34 +0000 (14:47 +0200)
commit334165d9fb69f357fa8e1e4766f9c6600aa67e5d
tree456637cb17013ba15bfecff84ad5e6f28d5ba48b
parent96fa26b74cdcf9f5c98996bf36bec9fb5b19ffe2
NFS: Don't discard pNFS layout segments that are marked for return

commit 39fd01863616964f009599e50ca5c6ea9ebf88d6 upstream.

If the pNFS layout segment is marked with the NFS_LSEG_LAYOUTRETURN
flag, then the assumption is that it has some reporting requirement
to perform through a layoutreturn (e.g. flexfiles layout stats or error
information).

Fixes: e0b7d420f72a ("pNFS: Don't discard layout segments that are marked for return")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pnfs.c