aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-10-11 22:31:35 +0800
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:34:18 +0200
commitf3ab5fdb8d463662c44827f714be2aaeef850c60 (patch)
tree63547134456303b3c22dc0bc91e56c86dff479e0 /fs/f2fs/segment.c
parentf9ae027e5898c7e84ffa81d5bd17ed51d68414fb (diff)
downloadandroid_kernel_m2note-f3ab5fdb8d463662c44827f714be2aaeef850c60.tar.gz
f2fs: don't interrupt free nids building during nid allocation
Let build_free_nids support sync/async methods, in allocation flow of nids, we use synchronuous method, so that we can avoid looping in alloc_nid when free memory is low; in unblock_operations and f2fs_balance_fs_bg we use asynchronuous method in where low memory condition can interrupt us. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 6faa63acd..4e0b37389 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -439,7 +439,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
if (!available_free_memory(sbi, FREE_NIDS))
try_to_free_nids(sbi, MAX_FREE_NIDS);
else
- build_free_nids(sbi);
+ build_free_nids(sbi, false);
/* checkpoint is the only way to shrink partial cached entries */
if (!available_free_memory(sbi, NAT_ENTRIES) ||