Skip to content

Commit 261e3bb

Browse files
jtlaytonchucklever
authored andcommitted
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>
1 parent 3876258 commit 261e3bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfsd/nfs4state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4815,8 +4815,8 @@ nfsd4_init_slabs(void)
48154815
static unsigned long
48164816
nfsd4_state_shrinker_count(struct shrinker *shrink, struct shrink_control *sc)
48174817
{
4818-
int count;
48194818
struct nfsd_net *nn = shrink->private_data;
4819+
long count;
48204820

48214821
count = atomic_read(&nn->nfsd_courtesy_clients);
48224822
if (!count)

0 commit comments

Comments
 (0)