aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 00:29:07 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-20 09:10:04 -0400
commit3cb5ad152b54430f3e5f338c15f8cd434e7160c8 (patch)
tree84f89b065e23b7f174f2c7d777217c6b2d363da6 /fs/f2fs/file.c
parent50c8cdb35ad8016c52fb2326ef9d65542e3a3e1b (diff)
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.c6
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,
76 trace_f2fs_vm_page_mkwrite(page, DATA); 76 trace_f2fs_vm_page_mkwrite(page, DATA);
77mapped: 77mapped:
78 /* fill the page */ 78 /* fill the page */
79 wait_on_page_writeback(page); 79 f2fs_wait_on_page_writeback(page, DATA);
80out: 80out:
81 sb_end_pagefault(inode->i_sb); 81 sb_end_pagefault(inode->i_sb);
82 return block_page_mkwrite_return(err); 82 return block_page_mkwrite_return(err);
@@ -245,7 +245,7 @@ static void truncate_partial_data_page(struct inode *inode, u64 from)
245 f2fs_put_page(page, 1); 245 f2fs_put_page(page, 1);
246 return; 246 return;
247 } 247 }
248 wait_on_page_writeback(page); 248 f2fs_wait_on_page_writeback(page, DATA);
249 zero_user(page, offset, PAGE_CACHE_SIZE - offset); 249 zero_user(page, offset, PAGE_CACHE_SIZE - offset);
250 set_page_dirty(page); 250 set_page_dirty(page);
251 f2fs_put_page(page, 1); 251 f2fs_put_page(page, 1);
@@ -422,7 +422,7 @@ static void fill_zero(struct inode *inode, pgoff_t index,
422 f2fs_unlock_op(sbi); 422 f2fs_unlock_op(sbi);
423 423
424 if (!IS_ERR(page)) { 424 if (!IS_ERR(page)) {
425 wait_on_page_writeback(page); 425 f2fs_wait_on_page_writeback(page, DATA);
426 zero_user(page, start, len); 426 zero_user(page, start, len);
427 set_page_dirty(page); 427 set_page_dirty(page);
428 f2fs_put_page(page, 1); 428 f2fs_put_page(page, 1);