Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7abea1e8 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields
Browse files

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: default avatarJeff Layton <jlayton@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 97403d95
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2496,9 +2496,11 @@ 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;
	} else {
@@ -3041,9 +3043,11 @@ 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;
	}