mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge "f2fs: prepare a waiter before entering io_schedule"
This commit is contained in:
commit
5cd90ec00f
1 changed files with 4 additions and 2 deletions
|
|
@ -1258,8 +1258,6 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
|
|||
DEFINE_WAIT(wait);
|
||||
|
||||
for (;;) {
|
||||
prepare_to_wait(&sbi->cp_wait, &wait, TASK_UNINTERRUPTIBLE);
|
||||
|
||||
if (!get_pages(sbi, type))
|
||||
break;
|
||||
|
||||
|
|
@ -1269,6 +1267,10 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
|
|||
if (type == F2FS_DIRTY_META)
|
||||
f2fs_sync_meta_pages(sbi, META, LONG_MAX,
|
||||
FS_CP_META_IO);
|
||||
else if (type == F2FS_WB_CP_DATA)
|
||||
f2fs_submit_merged_write(sbi, DATA);
|
||||
|
||||
prepare_to_wait(&sbi->cp_wait, &wait, TASK_UNINTERRUPTIBLE);
|
||||
io_schedule_timeout(DEFAULT_IO_TIMEOUT);
|
||||
}
|
||||
finish_wait(&sbi->cp_wait, &wait);
|
||||
|
|
|
|||
Loading…
Reference in a new issue