diff options
author | Dai Ngo <dai.ngo@oracle.com> | 2023-01-11 12:17:09 -0800 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-01-11 21:32:05 -0500 |
commit | f385f7d244134246f984975ed34cd75f77de479f (patch) | |
tree | 41bf50360fc39545f6b62b58fcadeed4e04a0670 /fs/nfsd/netns.h | |
parent | e6cf91b7b47ff82b624bdfe2fdcde32bb52e71dd (diff) |
NFSD: register/unregister of nfsd-client shrinker at nfsd startup/shutdown time
Currently the nfsd-client shrinker is registered and unregistered at
the time the nfsd module is loaded and unloaded. The problem with this
is the shrinker is being registered before all of the relevant fields
in nfsd_net are initialized when nfsd is started. This can lead to an
oops when memory is low and the shrinker is called while nfsd is not
running.
This patch moves the register/unregister of nfsd-client shrinker from
module load/unload time to nfsd startup/shutdown time.
Fixes: 44df6f439a17 ("NFSD: add delegation reaper to react to low memory condition")
Reported-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/netns.h')
0 files changed, 0 insertions, 0 deletions