Skip to content

Commit 6165a16

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFSv4: Fix hangs when recovering open state after a server reboot
When we're using a cached open stateid or a delegation in order to avoid sending a CLAIM_PREVIOUS open RPC call to the server, we don't have a new open stateid to present to update_open_stateid(). Instead rely on nfs4_try_open_cached(), just as if we were doing a normal open. Fixes: d2bfda2 ("NFSv4: don't reprocess cached open CLAIM_PREVIOUS") Cc: [email protected] Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 21fd9e8 commit 6165a16

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/nfs/nfs4proc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,8 +1980,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
19801980
if (!data->rpc_done) {
19811981
if (data->rpc_status)
19821982
return ERR_PTR(data->rpc_status);
1983-
/* cached opens have already been processed */
1984-
goto update;
1983+
return nfs4_try_open_cached(data);
19851984
}
19861985

19871986
ret = nfs_refresh_inode(inode, &data->f_attr);
@@ -1990,7 +1989,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
19901989

19911990
if (data->o_res.delegation_type != 0)
19921991
nfs4_opendata_check_deleg(data, state);
1993-
update:
1992+
19941993
if (!update_open_stateid(state, &data->o_res.stateid,
19951994
NULL, data->o_arg.fmode))
19961995
return ERR_PTR(-EAGAIN);

0 commit comments

Comments
 (0)