This renames 'ret' variable to 'shrunk' as it used to count shrunk extents. This patch is the lost hunk from the upstream version of patch "fs: convert fs shrinkers to new scan/count API", which doesn't present in our backport:
9d22f7aba1b7ee7014fadd042a49be27a308ff74 Author: Vladimir Davydov <vdavy...@parallels.com> Date: Fri Jul 17 11:51:54 2015 +0300 ms/fs: convert fs shrinkers to new scan/count API Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- fs/ext4/extents_status.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 71a6e72e70aa..6f1f614c12ce 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c @@ -943,13 +943,15 @@ static int __ext4_es_shrink(struct ext4_sb_info *sbi, int nr_to_scan, struct ext4_inode_info *ei; struct list_head *cur, *tmp; LIST_HEAD(skipped); - int ret, nr_shrunk = 0; + int nr_shrunk = 0; int retried = 0, skip_precached = 1, nr_skipped = 0; spin_lock(&sbi->s_es_lru_lock); retry: list_for_each_safe(cur, tmp, &sbi->s_es_lru) { + int shrunk; + /* * If we have already reclaimed all extents from extent * status tree, just stop the loop immediately. @@ -976,13 +978,13 @@ retry: !write_trylock(&ei->i_es_lock)) continue; - ret = __es_try_to_reclaim_extents(ei, nr_to_scan); + shrunk = __es_try_to_reclaim_extents(ei, nr_to_scan); if (ei->i_es_lru_nr == 0) list_del_init(&ei->i_es_lru); write_unlock(&ei->i_es_lock); - nr_shrunk += ret; - nr_to_scan -= ret; + nr_shrunk += shrunk; + nr_to_scan -= shrunk; if (nr_to_scan == 0) break; } -- 2.13.5 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel