pNFS: Stricter ordering of layoutget and layoutreturn
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 5 Jan 2021 11:43:45 +0000 (06:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:30 +0000 (18:27 +0100)
commit06f58dbc49a23c99e5c0f246879ed16667f7bf8f
tree1c57c88f04e898f155315cd8d257ac8f44e98e74
parentecaaad18013317f8f5bbfd20a6bb77fb8e3c9380
pNFS: Stricter ordering of layoutget and layoutreturn

commit 2c8d5fc37fe2384a9bdb6965443ab9224d46f704 upstream.

If a layout return is in progress, we should wait for it to complete,
in case the layout segment we are picking up gets returned too.

Fixes: 30cb3ee299cb ("pNFS: Handle NFS4ERR_OLD_STATEID on layoutreturn by bumping the state seqid")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pnfs.c