diff options
author | Debabrata Banerjee <[email protected]> | 2017-03-15 21:01:31 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-05-02 15:50:26 -0400 |
commit | 4149bf498a3490a8ab506109e3893087f35fd23f (patch) | |
tree | dd893c4db36f48458ed797448018f670d79dab06 /module/zfs | |
parent | 44813aefad9a685be92214a331f413806974a419 (diff) |
Correct signed operation
Could return the wrong pages value
AKAMAI: zfs: CR 3695072
Reviewed-by: Tim Chase <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Debabrata Banerjee <[email protected]>
Issue #6035
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/arc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index efac973ba..ce9246061 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -4430,7 +4430,8 @@ __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 @@ -4438,7 +4439,6 @@ __arc_shrinker_func(struct shrinker *shrink, struct shrink_control *sc) * We've shrunk what we can, wake up threads. */ cv_broadcast(&arc_reclaim_waiters_cv); - } else pages = SHRINK_STOP; |