nfsd4: fix FREE_STATEID lockowner leak
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 27 May 2014 15:14:26 +0000 (11:14 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 9 Jun 2014 21:13:54 +0000 (17:13 -0400)
27b11428b7de ("nfsd4: remove lockowner when removing lock stateid")
introduced a memory leak.

Cc: stable@vger.kernel.org
Reported-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index e5197d947b9e6961657d5c93642ea6ad05518eee..c0d45cec9958ec185b975e1653a78b3c722b6f34 100644 (file)
@@ -3743,7 +3743,7 @@ nfsd4_free_lock_stateid(struct nfs4_ol_stateid *stp)
         * correspondance, and we have to delete the lockowner when we
         * delete the lock stateid:
         */
-       unhash_lockowner(lo);
+       release_lockowner(lo);
        return nfs_ok;
 }