NFSD: Only reinitilize the recall_lru list under the recall lock
authorBryan Schumaker <bjschuma@netapp.com>
Tue, 13 Dec 2011 21:35:58 +0000 (16:35 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 13 Dec 2011 22:11:45 +0000 (17:11 -0500)
unhash_delegation() will grab the recall lock before calling
list_del_init() in each of these places.  This patch removes the
redundant calls.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 213da7b7e7d30a4b39bd1c940e143429f8023c8f..19ca9b54200b6f7b6a28e33aface588081be3071 100644 (file)
@@ -1066,7 +1066,6 @@ expire_client(struct nfs4_client *clp)
        spin_unlock(&recall_lock);
        while (!list_empty(&reaplist)) {
                dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru);
-               list_del_init(&dp->dl_recall_lru);
                unhash_delegation(dp);
        }
        while (!list_empty(&clp->cl_openowners)) {
@@ -3133,7 +3132,6 @@ nfs4_laundromat(void)
        spin_unlock(&recall_lock);
        list_for_each_safe(pos, next, &reaplist) {
                dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
-               list_del_init(&dp->dl_recall_lru);
                unhash_delegation(dp);
        }
        test_val = nfsd4_lease;
@@ -4674,7 +4672,6 @@ __nfs4_state_shutdown(void)
        spin_unlock(&recall_lock);
        list_for_each_safe(pos, next, &reaplist) {
                dp = list_entry (pos, struct nfs4_delegation, dl_recall_lru);
-               list_del_init(&dp->dl_recall_lru);
                unhash_delegation(dp);
        }
 
This page took 0.031897 seconds and 5 git commands to generate.