Skip to content

Commit

Permalink
Correct signed operation
Browse files Browse the repository at this point in the history
Could return the wrong pages value

AKAMAI: zfs: CR 3695072

Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
  • Loading branch information
dbavatar committed Apr 17, 2017
1 parent fc54e0d commit 4a19ac2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4403,15 +4403,15 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc)
if (current_is_kswapd())
arc_kmem_reap_now();
#ifdef HAVE_SPLIT_SHRINKER_CALLBACK
pages = MAX(pages - btop(arc_evictable_memory()), 0);
pages = MAX((int64_t)pages -
(int64_t)btop(arc_evictable_memory()), 0);
#else
pages = btop(arc_evictable_memory());
#endif
/*
* We've shrunk what we can, wake up threads.
*/
cv_broadcast(&arc_reclaim_waiters_cv);

} else
pages = SHRINK_STOP;

Expand Down

0 comments on commit 4a19ac2

Please sign in to comment.