]> git.ipfire.org Git - people/arne_f/kernel.git/commit
virtio_balloon: fix shrinker count
authorWei Wang <wei.w.wang@intel.com>
Tue, 19 Nov 2019 10:02:33 +0000 (05:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:07:45 +0000 (10:07 +0100)
commitea0daf13a2fe11b2ff0a4b9a861cace1d24b211c
treeb9f0adc26fbbf91f4c6a14fafeed449444b0e78f
parent5b3c9f3f93cb15555ceda559ab320e6fc6782719
virtio_balloon: fix shrinker count

commit c9a6820fc0da2603be3054ee7590eb9f350508a7 upstream.

Instead of multiplying by page order, virtio balloon divided by page
order. The result is that it can return 0 if there are a bit less
than MAX_ORDER - 1 pages in use, and then shrinker scan won't be called.

Cc: stable@vger.kernel.org
Fixes: 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker")
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virtio/virtio_balloon.c