diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-11-04 17:46:04 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-11-04 17:46:50 -0500 |
commit | b78800baee494eaca1d8a9ca2d490704fcc49fa0 (patch) | |
tree | 6d5ece8e03a4166b55989617edb0e903d9822239 /fs | |
parent | 3378b7f40d79930f0f447a164c7e8fcbe4480e40 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e03e8efff53f..0cceb99705c9 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -410,7 +410,6 @@ static void nfs4_free_stid(struct kmem_cache *slab, struct nfs4_stid *s) | |||
410 | void | 410 | void |
411 | nfs4_put_delegation(struct nfs4_delegation *dp) | 411 | nfs4_put_delegation(struct nfs4_delegation *dp) |
412 | { | 412 | { |
413 | remove_stid(&dp->dl_stid); | ||
414 | if (atomic_dec_and_test(&dp->dl_count)) { | 413 | if (atomic_dec_and_test(&dp->dl_count)) { |
415 | nfs4_free_stid(deleg_slab, &dp->dl_stid); | 414 | nfs4_free_stid(deleg_slab, &dp->dl_stid); |
416 | num_delegations--; | 415 | num_delegations--; |
@@ -451,12 +450,14 @@ unhash_delegation(struct nfs4_delegation *dp) | |||
451 | static void destroy_revoked_delegation(struct nfs4_delegation *dp) | 450 | static void destroy_revoked_delegation(struct nfs4_delegation *dp) |
452 | { | 451 | { |
453 | list_del_init(&dp->dl_recall_lru); | 452 | list_del_init(&dp->dl_recall_lru); |
453 | remove_stid(&dp->dl_stid); | ||
454 | nfs4_put_delegation(dp); | 454 | nfs4_put_delegation(dp); |
455 | } | 455 | } |
456 | 456 | ||
457 | static void destroy_delegation(struct nfs4_delegation *dp) | 457 | static void destroy_delegation(struct nfs4_delegation *dp) |
458 | { | 458 | { |
459 | unhash_delegation(dp); | 459 | unhash_delegation(dp); |
460 | remove_stid(&dp->dl_stid); | ||
460 | nfs4_put_delegation(dp); | 461 | nfs4_put_delegation(dp); |
461 | } | 462 | } |
462 | 463 | ||
@@ -3161,6 +3162,7 @@ nfs4_open_delegation(struct net *net, struct svc_fh *fh, | |||
3161 | open->op_delegate_type = NFS4_OPEN_DELEGATE_READ; | 3162 | open->op_delegate_type = NFS4_OPEN_DELEGATE_READ; |
3162 | return; | 3163 | return; |
3163 | out_free: | 3164 | out_free: |
3165 | remove_stid(&dp->dl_stid); | ||
3164 | nfs4_put_delegation(dp); | 3166 | nfs4_put_delegation(dp); |
3165 | out_no_deleg: | 3167 | out_no_deleg: |
3166 | open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE; | 3168 | open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE; |