summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-07-30 08:27:13 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-08-01 16:28:26 -0400
commit7abea1e8e81ad7ba100bd97c4881027c73e2db3e (patch)
tree7d17964991214a03a207a250c12d673c81f1b0e1 /fs
parent97403d95e1a7f5b257e90aad1f3284953bc72671 (diff)
downloadlinux-stable-7abea1e8e81ad7ba100bd97c4881027c73e2db3e.tar.gz
linux-stable-7abea1e8e81ad7ba100bd97c4881027c73e2db3e.tar.bz2
linux-stable-7abea1e8e81ad7ba100bd97c4881027c73e2db3e.zip
nfsd: don't destroy client if mark_client_expired_locked fails
If it fails, it means that the client is in use and so destroying it would be bad. Currently, the client_mutex prevents this from happening but once we remove it, we won't be able to do this. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 56999cbe84a7..43e66fc1b90d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2496,8 +2496,10 @@ nfsd4_create_session(struct svc_rqst *rqstp,
old = find_confirmed_client_by_name(&unconf->cl_name, nn);
if (old) {
status = mark_client_expired_locked(old);
- if (status)
+ if (status) {
+ old = NULL;
goto out_free_conn;
+ }
}
move_to_confirmed(unconf);
conf = unconf;
@@ -3041,8 +3043,10 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
old = find_confirmed_client_by_name(&unconf->cl_name, nn);
if (old) {
status = mark_client_expired_locked(old);
- if (status)
+ if (status) {
+ old = NULL;
goto out;
+ }
}
move_to_confirmed(unconf);
conf = unconf;