aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@google.com>2015-07-06 12:19:04 -0400
committerMister Oyster <oysterized@gmail.com>2017-05-27 19:40:06 +0200
commit5d26d036e6b43673447af1d05647ec1fba4d0028 (patch)
tree390c97845b80cb92bfbd7a34db18b8bd66bbf094
parent5b75d4be5774254911d41cd1ae1416b456236fac (diff)
downloadandroid_kernel_m2note-5d26d036e6b43673447af1d05647ec1fba4d0028.tar.gz
ext4 crypto: fix return value for ext4_es_scan()
Between 3.10 and 3.18, the abstraction to scan for objects in the slab cache which can be freed when the system is under memory pressure changed. When I backported the ext4 code from 3.18 to the 3.10 kernel, I didn't get the return value required by the calling conventions for the scan function correct, which could potentially cause the memory reclaimer to loop indefinitely. Change-Id: I1712fedf96fd91c911fb4d019d7ef76f6c4c1808 Signed-off-by: "Theodore Ts'o" <tytso@google.com>
-rw-r--r--fs/ext4/extents_status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 2d6c28c9b..66ef2d74e 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -1077,7 +1077,7 @@ static unsigned long ext4_es_scan(struct shrinker *shrink,
nr_shrunk = __ext4_es_shrink(sbi, nr_to_scan, NULL);
trace_ext4_es_shrink_scan_exit(sbi->s_sb, nr_shrunk, ret);
- return nr_shrunk;
+ return percpu_counter_read_positive(&sbi->s_es_stats.es_stats_lru_cnt);
}
static int ext4_es_shrink(struct shrinker *shrink, struct shrink_control *sc)