NFSv4: Don't discard segments marked for return in _pnfs_return_layout()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 18 Apr 2021 19:00:45 +0000 (15:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:40:19 +0000 (10:40 +0200)
commit80e34f4957ec3010c85f9bb0b568a8d46acdf535
tree9391ab0318c345d109b8c4ae4a7de00cc14c4c1a
parent23e17ec1a5eb53fe39cc34fa5592686d5acd0dac
NFSv4: Don't discard segments marked for return in _pnfs_return_layout()

commit de144ff4234f935bd2150108019b5d87a90a8a96 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: 6d597e175012 ("pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args")
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