Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "nfsd: remove_stid can be incorporated into nfs4_put_delegation"

This reverts commit 7ebe40f20372688a627ad6c754bc0d1c05df58a9. We forgot
the nfs4_put_delegation call in fs/nfsd/nfs4callback.c which should not
be unhashing the stateid. This lead to warnings from the idr code when
we tried to removed id's twice.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>

+3 -1
+3 -1
fs/nfsd/nfs4state.c
··· 410 410 void 411 411 nfs4_put_delegation(struct nfs4_delegation *dp) 412 412 { 413 - remove_stid(&dp->dl_stid); 414 413 if (atomic_dec_and_test(&dp->dl_count)) { 415 414 nfs4_free_stid(deleg_slab, &dp->dl_stid); 416 415 num_delegations--; ··· 450 451 static void destroy_revoked_delegation(struct nfs4_delegation *dp) 451 452 { 452 453 list_del_init(&dp->dl_recall_lru); 454 + remove_stid(&dp->dl_stid); 453 455 nfs4_put_delegation(dp); 454 456 } 455 457 456 458 static void destroy_delegation(struct nfs4_delegation *dp) 457 459 { 458 460 unhash_delegation(dp); 461 + remove_stid(&dp->dl_stid); 459 462 nfs4_put_delegation(dp); 460 463 } 461 464 ··· 3162 3161 open->op_delegate_type = NFS4_OPEN_DELEGATE_READ; 3163 3162 return; 3164 3163 out_free: 3164 + remove_stid(&dp->dl_stid); 3165 3165 nfs4_put_delegation(dp); 3166 3166 out_no_deleg: 3167 3167 open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE;