diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-03-18 05:29:07 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-03-20 14:10:04 +0100 |
commit | 3cb5ad152b54430f3e5f338c15f8cd434e7160c8 (patch) | |
tree | 84f89b065e23b7f174f2c7d777217c6b2d363da6 /fs/f2fs/file.c | |
parent | f2fs: introduce nr_pages_to_write for segment alignment (diff) | |
download | linux-3cb5ad152b54430f3e5f338c15f8cd434e7160c8.tar.xz linux-3cb5ad152b54430f3e5f338c15f8cd434e7160c8.zip |
f2fs: call f2fs_wait_on_page_writeback instead of native function
If a page is on writeback, f2fs can face with deadlock due to under writepages.
This is caused by merging IOs inside f2fs, so if it comes to detect, let's throw
merged IOs, which is implemented by f2fs_wait_on_page_writeback.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a4cc1d6bdd84..e755ee57e042 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -76,7 +76,7 @@ static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma, trace_f2fs_vm_page_mkwrite(page, DATA); mapped: /* fill the page */ - wait_on_page_writeback(page); + f2fs_wait_on_page_writeback(page, DATA); out: sb_end_pagefault(inode->i_sb); return block_page_mkwrite_return(err); @@ -245,7 +245,7 @@ static void truncate_partial_data_page(struct inode *inode, u64 from) f2fs_put_page(page, 1); return; } - wait_on_page_writeback(page); + f2fs_wait_on_page_writeback(page, DATA); zero_user(page, offset, PAGE_CACHE_SIZE - offset); set_page_dirty(page); f2fs_put_page(page, 1); @@ -422,7 +422,7 @@ static void fill_zero(struct inode *inode, pgoff_t index, f2fs_unlock_op(sbi); if (!IS_ERR(page)) { - wait_on_page_writeback(page); + f2fs_wait_on_page_writeback(page, DATA); zero_user(page, start, len); set_page_dirty(page); f2fs_put_page(page, 1); |