NFSv4: Fix hangs when recovering open state after a server reboot
commit6165a16a5aupstream. 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:d2bfda2e7a("NFSv4: don't reprocess cached open CLAIM_PREVIOUS") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
80a4200d51
commit
3d328a17c8
+2
-3
@@ -1975,8 +1975,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
|
|||||||
if (!data->rpc_done) {
|
if (!data->rpc_done) {
|
||||||
if (data->rpc_status)
|
if (data->rpc_status)
|
||||||
return ERR_PTR(data->rpc_status);
|
return ERR_PTR(data->rpc_status);
|
||||||
/* cached opens have already been processed */
|
return nfs4_try_open_cached(data);
|
||||||
goto update;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = nfs_refresh_inode(inode, &data->f_attr);
|
ret = nfs_refresh_inode(inode, &data->f_attr);
|
||||||
@@ -1985,7 +1984,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
|
|||||||
|
|
||||||
if (data->o_res.delegation_type != 0)
|
if (data->o_res.delegation_type != 0)
|
||||||
nfs4_opendata_check_deleg(data, state);
|
nfs4_opendata_check_deleg(data, state);
|
||||||
update:
|
|
||||||
if (!update_open_stateid(state, &data->o_res.stateid,
|
if (!update_open_stateid(state, &data->o_res.stateid,
|
||||||
NULL, data->o_arg.fmode))
|
NULL, data->o_arg.fmode))
|
||||||
return ERR_PTR(-EAGAIN);
|
return ERR_PTR(-EAGAIN);
|
||||||
|
|||||||
Reference in New Issue
Block a user