|
@@ -5238,9 +5238,8 @@ static const struct rpc_call_ops nfs4_release_lockowner_ops = {
|
|
|
.rpc_release = nfs4_release_lockowner_release,
|
|
|
};
|
|
|
|
|
|
-int nfs4_release_lockowner(struct nfs4_lock_state *lsp)
|
|
|
+static int nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp)
|
|
|
{
|
|
|
- struct nfs_server *server = lsp->ls_state->owner->so_server;
|
|
|
struct nfs_release_lockowner_data *data;
|
|
|
struct rpc_message msg = {
|
|
|
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RELEASE_LOCKOWNER],
|
|
@@ -6879,6 +6878,18 @@ static int nfs41_free_stateid(struct nfs_server *server, nfs4_stateid *stateid)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+static int nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp)
|
|
|
+{
|
|
|
+ struct rpc_task *task;
|
|
|
+
|
|
|
+ task = _nfs41_free_stateid(server, &lsp->ls_stateid, false);
|
|
|
+ nfs4_free_lock_state(server, lsp);
|
|
|
+ if (IS_ERR(task))
|
|
|
+ return PTR_ERR(task);
|
|
|
+ rpc_put_task(task);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static bool nfs41_match_stateid(const nfs4_stateid *s1,
|
|
|
const nfs4_stateid *s2)
|
|
|
{
|
|
@@ -6968,6 +6979,7 @@ static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = {
|
|
|
.call_sync = _nfs4_call_sync,
|
|
|
.match_stateid = nfs4_match_stateid,
|
|
|
.find_root_sec = nfs4_find_root_sec,
|
|
|
+ .free_lock_state = nfs4_release_lockowner,
|
|
|
.reboot_recovery_ops = &nfs40_reboot_recovery_ops,
|
|
|
.nograce_recovery_ops = &nfs40_nograce_recovery_ops,
|
|
|
.state_renewal_ops = &nfs40_state_renewal_ops,
|
|
@@ -6985,6 +6997,7 @@ static const struct nfs4_minor_version_ops nfs_v4_1_minor_ops = {
|
|
|
.call_sync = nfs4_call_sync_sequence,
|
|
|
.match_stateid = nfs41_match_stateid,
|
|
|
.find_root_sec = nfs41_find_root_sec,
|
|
|
+ .free_lock_state = nfs41_free_lock_state,
|
|
|
.reboot_recovery_ops = &nfs41_reboot_recovery_ops,
|
|
|
.nograce_recovery_ops = &nfs41_nograce_recovery_ops,
|
|
|
.state_renewal_ops = &nfs41_state_renewal_ops,
|