f2fs: give scheduling point in shrinking path
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Jan 2016 23:31:48 +0000 (07:31 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 23 Feb 2016 00:07:23 +0000 (16:07 -0800)
It needs to give a chance to be rescheduled while shrinking slab entries.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/extent_cache.c

index 53f49f71332316e348d986de5463c7a26ae4bd2b..365cf950891b6003cc83d1bfa31244dad8efdf99 100644 (file)
@@ -569,6 +569,7 @@ unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink)
 
                if (node_cnt + tree_cnt >= nr_shrink)
                        goto unlock_out;
+               cond_resched();
        }
        up_write(&sbi->extent_tree_lock);