mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 01:53:20 -04:00
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>
This commit is contained in:
@@ -4815,8 +4815,8 @@ nfsd4_init_slabs(void)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user