Skip to content

Commit 5b4a82a

Browse files
bcodding-rhTrond Myklebust
authored andcommitted
Revert "NFSv4: Retry LOCK on OLD_STATEID during delegation return"
Olga Kornievskaia reports that this patch breaks NFSv4.0 state recovery. It also introduces additional complexity in the error paths for cases not related to the original problem. Let's revert it for now, and address the original problem in another manner. This reverts commit f5ea161. Fixes: f5ea161 ("NFSv4: Retry LOCK on OLD_STATEID during delegation return") Reported-by: Kornievskaia, Olga <Olga.Kornievskaia@netapp.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent e901f17 commit 5b4a82a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/nfs/nfs4proc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7160,15 +7160,15 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)
71607160
{
71617161
struct nfs4_lockdata *data = calldata;
71627162
struct nfs4_lock_state *lsp = data->lsp;
7163-
struct nfs_server *server = NFS_SERVER(d_inode(data->ctx->dentry));
71647163

71657164
if (!nfs4_sequence_done(task, &data->res.seq_res))
71667165
return;
71677166

71687167
data->rpc_status = task->tk_status;
71697168
switch (task->tk_status) {
71707169
case 0:
7171-
renew_lease(server, data->timestamp);
7170+
renew_lease(NFS_SERVER(d_inode(data->ctx->dentry)),
7171+
data->timestamp);
71727172
if (data->arg.new_lock && !data->cancelled) {
71737173
data->fl.fl_flags &= ~(FL_SLEEP | FL_ACCESS);
71747174
if (locks_lock_inode_wait(lsp->ls_state->inode, &data->fl) < 0)
@@ -7189,8 +7189,6 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)
71897189
if (!nfs4_stateid_match(&data->arg.open_stateid,
71907190
&lsp->ls_state->open_stateid))
71917191
goto out_restart;
7192-
else if (nfs4_async_handle_error(task, server, lsp->ls_state, NULL) == -EAGAIN)
7193-
goto out_restart;
71947192
} else if (!nfs4_stateid_match(&data->arg.lock_stateid,
71957193
&lsp->ls_stateid))
71967194
goto out_restart;

0 commit comments

Comments
 (0)