aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1f3c6118c8ce..8fbc10054115 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5238,9 +5238,8 @@ static const struct rpc_call_ops nfs4_release_lockowner_ops = {
5238 .rpc_release = nfs4_release_lockowner_release, 5238 .rpc_release = nfs4_release_lockowner_release,
5239}; 5239};
5240 5240
5241int nfs4_release_lockowner(struct nfs4_lock_state *lsp) 5241static int nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp)
5242{ 5242{
5243 struct nfs_server *server = lsp->ls_state->owner->so_server;
5244 struct nfs_release_lockowner_data *data; 5243 struct nfs_release_lockowner_data *data;
5245 struct rpc_message msg = { 5244 struct rpc_message msg = {
5246 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RELEASE_LOCKOWNER], 5245 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RELEASE_LOCKOWNER],
@@ -6879,6 +6878,18 @@ static int nfs41_free_stateid(struct nfs_server *server, nfs4_stateid *stateid)
6879 return ret; 6878 return ret;
6880} 6879}
6881 6880
6881static int nfs41_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp)
6882{
6883 struct rpc_task *task;
6884
6885 task = _nfs41_free_stateid(server, &lsp->ls_stateid, false);
6886 nfs4_free_lock_state(server, lsp);
6887 if (IS_ERR(task))
6888 return PTR_ERR(task);
6889 rpc_put_task(task);
6890 return 0;
6891}
6892
6882static bool nfs41_match_stateid(const nfs4_stateid *s1, 6893static bool nfs41_match_stateid(const nfs4_stateid *s1,
6883 const nfs4_stateid *s2) 6894 const nfs4_stateid *s2)
6884{ 6895{
@@ -6968,6 +6979,7 @@ static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = {
6968 .call_sync = _nfs4_call_sync, 6979 .call_sync = _nfs4_call_sync,
6969 .match_stateid = nfs4_match_stateid, 6980 .match_stateid = nfs4_match_stateid,
6970 .find_root_sec = nfs4_find_root_sec, 6981 .find_root_sec = nfs4_find_root_sec,
6982 .free_lock_state = nfs4_release_lockowner,
6971 .reboot_recovery_ops = &nfs40_reboot_recovery_ops, 6983 .reboot_recovery_ops = &nfs40_reboot_recovery_ops,
6972 .nograce_recovery_ops = &nfs40_nograce_recovery_ops, 6984 .nograce_recovery_ops = &nfs40_nograce_recovery_ops,
6973 .state_renewal_ops = &nfs40_state_renewal_ops, 6985 .state_renewal_ops = &nfs40_state_renewal_ops,
@@ -6985,6 +6997,7 @@ static const struct nfs4_minor_version_ops nfs_v4_1_minor_ops = {
6985 .call_sync = nfs4_call_sync_sequence, 6997 .call_sync = nfs4_call_sync_sequence,
6986 .match_stateid = nfs41_match_stateid, 6998 .match_stateid = nfs41_match_stateid,
6987 .find_root_sec = nfs41_find_root_sec, 6999 .find_root_sec = nfs41_find_root_sec,
7000 .free_lock_state = nfs41_free_lock_state,
6988 .reboot_recovery_ops = &nfs41_reboot_recovery_ops, 7001 .reboot_recovery_ops = &nfs41_reboot_recovery_ops,
6989 .nograce_recovery_ops = &nfs41_nograce_recovery_ops, 7002 .nograce_recovery_ops = &nfs41_nograce_recovery_ops,
6990 .state_renewal_ops = &nfs41_state_renewal_ops, 7003 .state_renewal_ops = &nfs41_state_renewal_ops,