SUNRPC: Remove BUG_ON call sites

commit 789ce196a31dd13276076762204bee87df893e53 upstream.

There is no need to take down the whole system for these assertions.

I'd rather not attempt a heroic save here, as some bug has occurred
that has left the transport data structures in an unknown state.
Just warn and then leak the left-over resources.

Acked-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Chuck Lever 2023-09-19 11:35:15 -04:00 committed by Greg Kroah-Hartman
parent 27a58a19bd
commit d54afaef65

View file

@ -577,11 +577,12 @@ svc_destroy(struct kref *ref)
timer_shutdown_sync(&serv->sv_temptimer); timer_shutdown_sync(&serv->sv_temptimer);
/* /*
* The last user is gone and thus all sockets have to be destroyed to * Remaining transports at this point are not expected.
* the point. Check this.
*/ */
BUG_ON(!list_empty(&serv->sv_permsocks)); WARN_ONCE(!list_empty(&serv->sv_permsocks),
BUG_ON(!list_empty(&serv->sv_tempsocks)); "SVC: permsocks remain for %s\n", serv->sv_program->pg_name);
WARN_ONCE(!list_empty(&serv->sv_tempsocks),
"SVC: tempsocks remain for %s\n", serv->sv_program->pg_name);
cache_clean_deferred(serv); cache_clean_deferred(serv);