diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-10-31 17:08:57 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 09:08:40 -0800 |
commit | 26e15787b98f3cac67d0b9458befd24adbef7272 (patch) | |
tree | 2cfc0d211861ef7a261d3c070c1bb284076806bb /include/linux | |
parent | 1bccf76533a1e336dfa8007554d4283253e259c7 (diff) |
vmscan: fix shrinker callback bug in fs/super.c
commit 09f363c7363eb10cfb4b82094bd7064e5608258b upstream.
The callback must not return -1 when nr_to_scan is zero. Fix the bug in
fs/super.c and add this requirement to the callback specification.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/shrinker.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h index 790651b4e5ba..a83833a1f7a2 100644 --- a/include/linux/shrinker.h +++ b/include/linux/shrinker.h @@ -20,6 +20,7 @@ struct shrink_control { * 'nr_to_scan' entries and attempt to free them up. It should return * the number of objects which remain in the cache. If it returns -1, it means * it cannot do any scanning at this time (eg. there is a risk of deadlock). + * The callback must not return -1 if nr_to_scan is zero. * * The 'gfpmask' refers to the allocation we are currently trying to * fulfil. |