This is a note to let you know that I've just added the patch titled NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nfsv4.x-drop-the-slot-if-nfs4_delegreturn_prepare-waits-for-layoutreturn.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 5326de9e94bedcf7366e7e7625d4deb8c1f1ca8a Mon Sep 17 00:00:00 2001 From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Date: Wed, 13 Nov 2019 09:39:36 +0100 Subject: NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> commit 5326de9e94bedcf7366e7e7625d4deb8c1f1ca8a upstream. If nfs4_delegreturn_prepare needs to wait for a layoutreturn to complete then make sure we drop the sequence slot if we hold it. Fixes: 1c5bd76d17cc ("pNFS: Enable layoutreturn operation for return-on-close") Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/nfs/nfs4proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5797,8 +5797,10 @@ static void nfs4_delegreturn_prepare(str d_data = (struct nfs4_delegreturndata *)data; - if (!d_data->lr.roc && nfs4_wait_on_layoutreturn(d_data->inode, task)) + if (!d_data->lr.roc && nfs4_wait_on_layoutreturn(d_data->inode, task)) { + nfs4_sequence_done(task, &d_data->res.seq_res); return; + } nfs4_setup_sequence(d_data->res.server->nfs_client, &d_data->args.seq_args, Patches currently in stable-queue which might be from trond.myklebust@xxxxxxxxxxxxxxx are queue-4.14/nfsv4.x-drop-the-slot-if-nfs4_delegreturn_prepare-waits-for-layoutreturn.patch