nfsd4: don't leave freed stateid hashed
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 12 Dec 2012 20:24:12 +0000 (15:24 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 18 Dec 2012 03:00:28 +0000 (22:00 -0500)
Note the stateid is hashed early on in init_stid(), but isn't currently
being unhashed on error paths.

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

index 8e127b39d3231f084c6030345ad11a222401c6d7..ac8ed96c41994467512a632db89c8bed9bff6b27 100644 (file)
@@ -2983,6 +2983,7 @@ out:
        }
        return;
 out_free:
+       unhash_stid(&dp->dl_stid);
        nfs4_put_delegation(dp);
 out_no_deleg:
        flag = NFS4_OPEN_DELEGATE_NONE;