summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-11-13 09:39:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 19:45:48 +0100
commit34ed0dfdd8f561a05bbc62aae31ac29cc9cb8d07 (patch)
treeefb5e2f9f278633d2d4bd3b5f16059423b3ca56c /fs
parent760e1a2e4d220c7c1992bbb197790cedf0c86f3d (diff)
NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn
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@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index f1526f65cc58..3dd403943b07 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5797,8 +5797,10 @@ static void nfs4_delegreturn_prepare(struct rpc_task *task, void *data)
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,