diff options
author | Jeff Layton <jlayton@kernel.org> | 2025-03-03 20:26:03 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-03-10 16:11:12 +0300 |
commit | 261e3bbf9747e9c7c87b3bce519df94754e24ed8 (patch) | |
tree | e9787ef918d8f64ba7aaa97fccce5e4ec0fed568 | |
parent | 387625808c45ccd46350440436f4a2f5cec4d04a (diff) | |
download | linux-261e3bbf9747e9c7c87b3bce519df94754e24ed8.tar.xz |
nfsd: use a long for the count in nfsd4_state_shrinker_count()
If there are no courtesy clients then the return value from the
atomic_long_read() could overflow an int. Use a long to store the value
instead.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e51c310bd111..982045944c3c 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4815,8 +4815,8 @@ out: static unsigned long nfsd4_state_shrinker_count(struct shrinker *shrink, struct shrink_control *sc) { - int count; struct nfsd_net *nn = shrink->private_data; + long count; count = atomic_read(&nn->nfsd_courtesy_clients); if (!count) |