Skip to content
Commit ca791e1a authored by Jeff Layton's avatar Jeff Layton Committed by Greg Kroah-Hartman
Browse files

nfsd: drop the nfsd_put helper

[ Upstream commit 64e63041 ]

It's not safe to call nfsd_put once nfsd_last_thread has been called, as
that function will zero out the nn->nfsd_serv pointer.

Drop the nfsd_put helper altogether and open-code the svc_put in its
callers instead. That allows us to not be reliant on the value of that
pointer when handling an error.

Fixes: 2a501f55

 ("nfsd: call nfsd_last_thread() before final nfsd_put()")
Reported-by: default avatarZhi Li <yieli@redhat.com>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: default avatarJeffrey Layton <jlayton@redhat.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 838a602d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment