diff options
author | Changman Lee <cm224.lee@samsung.com> | 2013-11-07 12:48:25 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-08 14:10:29 +0900 |
commit | fb51b5ef9c07844f80402702bd3d3002ceca5cd9 (patch) | |
tree | 203243206fd73a201d6e316079e26384baf9754b /fs/f2fs/segment.c | |
parent | 3b03f72445ba1437cfa29f9719bb3cfdb60558d9 (diff) |
f2fs: cleanup waiting routine for writeback pages in cp
use genernal method supported by kernel
o changes from v1
If any waiter exists at end io, wake up it.
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 5 |
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); |