diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-11-01 04:08:57 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 04:30:49 +0400 |
commit | 09f363c7363eb10cfb4b82094bd7064e5608258b (patch) | |
tree | 4b1890150cf7f7a2339694ea97efa6c45b8705a1 /fs/super.c | |
parent | 20c8c62891a346e09c8d26de41ce78bd7a76c5b0 (diff) | |
download | linux-09f363c7363eb10cfb4b82094bd7064e5608258b.tar.xz |
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 <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>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c index 3f56a269a4f4..32a81f3467e0 100644 --- a/fs/super.c +++ b/fs/super.c @@ -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); |