|
@@ -2019,7 +2019,7 @@ static int nfs4_open_reclaim(struct nfs4_state_owner *sp, struct nfs4_state *sta
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-static int nfs4_handle_delegation_recall_error(struct nfs_server *server, struct nfs4_state *state, const nfs4_stateid *stateid, int err)
|
|
|
+static int nfs4_handle_delegation_recall_error(struct nfs_server *server, struct nfs4_state *state, const nfs4_stateid *stateid, struct file_lock *fl, int err)
|
|
|
{
|
|
|
switch (err) {
|
|
|
default:
|
|
@@ -2066,7 +2066,11 @@ static int nfs4_handle_delegation_recall_error(struct nfs_server *server, struct
|
|
|
return -EAGAIN;
|
|
|
case -ENOMEM:
|
|
|
case -NFS4ERR_DENIED:
|
|
|
- /* kill_proc(fl->fl_pid, SIGLOST, 1); */
|
|
|
+ if (fl) {
|
|
|
+ struct nfs4_lock_state *lsp = fl->fl_u.nfs4_fl.owner;
|
|
|
+ if (lsp)
|
|
|
+ set_bit(NFS_LOCK_LOST, &lsp->ls_flags);
|
|
|
+ }
|
|
|
return 0;
|
|
|
}
|
|
|
return err;
|
|
@@ -2102,7 +2106,7 @@ int nfs4_open_delegation_recall(struct nfs_open_context *ctx,
|
|
|
err = nfs4_open_recover_helper(opendata, FMODE_READ);
|
|
|
}
|
|
|
nfs4_opendata_put(opendata);
|
|
|
- return nfs4_handle_delegation_recall_error(server, state, stateid, err);
|
|
|
+ return nfs4_handle_delegation_recall_error(server, state, stateid, NULL, err);
|
|
|
}
|
|
|
|
|
|
static void nfs4_open_confirm_prepare(struct rpc_task *task, void *calldata)
|
|
@@ -6757,7 +6761,7 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state,
|
|
|
if (err != 0)
|
|
|
return err;
|
|
|
err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
|
|
|
- return nfs4_handle_delegation_recall_error(server, state, stateid, err);
|
|
|
+ return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err);
|
|
|
}
|
|
|
|
|
|
struct nfs_release_lockowner_data {
|