Commit 261e3bbf authored by Jeff Layton's avatar Jeff Layton Committed by Chuck Lever
Browse files

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: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 38762580
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)