]> Pileus Git - ~andy/linux/blobdiff - fs/nfs/nfs4state.c
Merge branch 'bcache-for-upstream' of git://evilpiepirate.org/~kent/linux-bcache...
[~andy/linux] / fs / nfs / nfs4state.c
index 0b32f9483b7afb07d993fb92568bec662b3dd9a4..300d17d85c0e03397d352746fc6fc775b39941e1 100644 (file)
@@ -921,6 +921,7 @@ static struct nfs4_lock_state *nfs4_get_lock_state(struct nfs4_state *state, fl_
  */
 void nfs4_put_lock_state(struct nfs4_lock_state *lsp)
 {
+       struct nfs_server *server;
        struct nfs4_state *state;
 
        if (lsp == NULL)
@@ -932,11 +933,13 @@ void nfs4_put_lock_state(struct nfs4_lock_state *lsp)
        if (list_empty(&state->lock_states))
                clear_bit(LK_STATE_IN_USE, &state->flags);
        spin_unlock(&state->state_lock);
+       server = state->owner->so_server;
        if (test_bit(NFS_LOCK_INITIALIZED, &lsp->ls_flags)) {
-               if (nfs4_release_lockowner(lsp) == 0)
-                       return;
-       }
-       nfs4_free_lock_state(lsp->ls_state->owner->so_server, lsp);
+               struct nfs_client *clp = server->nfs_client;
+
+               clp->cl_mvops->free_lock_state(server, lsp);
+       } else
+               nfs4_free_lock_state(server, lsp);
 }
 
 static void nfs4_fl_copy_lock(struct file_lock *dst, struct file_lock *src)