summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index ff363e686b7..86dc2894919 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -592,8 +592,9 @@ static void f2fs_end_io_write(struct bio *bio, int err)
if (p->is_sync)
complete(p->wait);
- if (!get_pages(p->sbi, F2FS_WRITEBACK) && p->sbi->cp_task)
- wake_up_process(p->sbi->cp_task);
+ if (!get_pages(p->sbi, F2FS_WRITEBACK) &&
+ !list_empty(&p->sbi->cp_wait.task_list))
+ wake_up(&p->sbi->cp_wait);
kfree(p);
bio_put(bio);