diff options
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 0b32f9483b7a..300d17d85c0e 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -921,6 +921,7 @@ static struct nfs4_lock_state *nfs4_get_lock_state(struct nfs4_state *state, fl_ | |||
921 | */ | 921 | */ |
922 | void nfs4_put_lock_state(struct nfs4_lock_state *lsp) | 922 | void nfs4_put_lock_state(struct nfs4_lock_state *lsp) |
923 | { | 923 | { |
924 | struct nfs_server *server; | ||
924 | struct nfs4_state *state; | 925 | struct nfs4_state *state; |
925 | 926 | ||
926 | if (lsp == NULL) | 927 | if (lsp == NULL) |
@@ -932,11 +933,13 @@ void nfs4_put_lock_state(struct nfs4_lock_state *lsp) | |||
932 | if (list_empty(&state->lock_states)) | 933 | if (list_empty(&state->lock_states)) |
933 | clear_bit(LK_STATE_IN_USE, &state->flags); | 934 | clear_bit(LK_STATE_IN_USE, &state->flags); |
934 | spin_unlock(&state->state_lock); | 935 | spin_unlock(&state->state_lock); |
936 | server = state->owner->so_server; | ||
935 | if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags)) { | 937 | if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags)) { |
936 | if (nfs4_release_lockowner(lsp) == 0) | 938 | struct nfs_client *clp = server->nfs_client; |
937 | return; | 939 | |
938 | } | 940 | clp->cl_mvops->free_lock_state(server, lsp); |
939 | nfs4_free_lock_state(lsp->ls_state->owner->so_server, lsp); | 941 | } else |
942 | nfs4_free_lock_state(server, lsp); | ||
940 | } | 943 | } |
941 | 944 | ||
942 | static void nfs4_fl_copy_lock(struct file_lock *dst, struct file_lock *src) | 945 | static void nfs4_fl_copy_lock(struct file_lock *dst, struct file_lock *src) |