mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
vmscan: fix shrinker callback bug in fs/super.c
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 <[email protected]> Cc: Dave Chinner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
20c8c62891
commit
09f363c736
2 changed files with 2 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ static int prune_super(struct shrinker *shrink, struct shrink_control *sc)
|
|||
return -1;
|
||||
|
||||
if (!grab_super_passive(sb))
|
||||
return -1;
|
||||
return !sc->nr_to_scan ? 0 : -1;
|
||||
|
||||
if (sb->s_op && sb->s_op->nr_cached_objects)
|
||||
fs_objects = sb->s_op->nr_cached_objects(sb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue