Commit 7a6db10b authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Zheng Zengkai
Browse files

nfsd: register pernet ops last, unregister first



stable inclusion
from stable-5.10.20
commit 7c7cb07d4affcf41749234fe9dc4d90cd3959e32
bugzilla: 50608

--------------------------------

[ Upstream commit bd5ae928 ]

These pernet operations may depend on stuff set up or torn down in the
module init/exit functions.  And they may be called at any time in
between.  So it makes more sense for them to be the last to be
registered in the init function, and the first to be unregistered in the
exit function.

In particular, without this, the drc slab is being destroyed before all
the per-net drcs are shut down, resulting in an "Objects remaining in
nfsd_drc on __kmem_cache_shutdown()" warning in exit_nfsd.

Reported-by: default avatarZhi Li <yieli@redhat.com>
Fixes: 3ba75830 "nfsd4: drc containerization"
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 843f0111
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment