diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-06-06 12:53:48 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-07-10 16:41:34 -0400 |
commit | 74dbafaf5d84b5187e50dbe82442ec8df66d55b3 (patch) | |
tree | d31e1c1d7c1691893b91ae3bc1453fa6eb46d585 /fs/nfsd/nfs4state.c | |
parent | 2930d381d22b9c56f40dd4c63a8fa59719ca2c3c (diff) |
nfsd4: release openowners on free in >=4.1 case
We don't need to keep openowners around in the >=4.1 case, because they
aren't needed to handle CLOSE replays any more (that's a problem for
sessions). And doing so causes unexpected failures on a subsequent
destroy_clientid to fail.
We probably also need something comparable for lock owners on last
unlock.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 9efa4055b5a8..e404fca08260 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3763,12 +3763,19 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
3763 | nfsd4_close_open_stateid(stp); | 3763 | nfsd4_close_open_stateid(stp); |
3764 | oo->oo_last_closed_stid = stp; | 3764 | oo->oo_last_closed_stid = stp; |
3765 | 3765 | ||
3766 | /* place unused nfs4_stateowners on so_close_lru list to be | 3766 | if (list_empty(&oo->oo_owner.so_stateids)) { |
3767 | * released by the laundromat service after the lease period | 3767 | if (cstate->minorversion) { |
3768 | * to enable us to handle CLOSE replay | 3768 | release_openowner(oo); |
3769 | */ | 3769 | cstate->replay_owner = NULL; |
3770 | if (list_empty(&oo->oo_owner.so_stateids)) | 3770 | } else { |
3771 | move_to_close_lru(oo); | 3771 | /* |
3772 | * In the 4.0 case we need to keep the owners around a | ||
3773 | * little while to handle CLOSE replay. | ||
3774 | */ | ||
3775 | if (list_empty(&oo->oo_owner.so_stateids)) | ||
3776 | move_to_close_lru(oo); | ||
3777 | } | ||
3778 | } | ||
3772 | out: | 3779 | out: |
3773 | if (!cstate->replay_owner) | 3780 | if (!cstate->replay_owner) |
3774 | nfs4_unlock_state(); | 3781 | nfs4_unlock_state(); |