Skip to contentSkip to conversation

f2fs: fix to wait on page writeback before updating page

PATCH New Chao Yu 1 participant 1 message Jun 21, 2018 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: fix to wait on page writeback before updating page

From: Chao Yu <[email protected]>

In error path of f2fs_move_rehashed_dirents, inode page could be writeback state, so we should wait on inode page writeback before updating it.

---
 fs/f2fs/inline.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/inline.c +1 -0
index a6d6d340211a..d0d430ad79ff 100644
@@ -477,6 +477,7 @@ static int f2fs_move_rehashed_dirents(struct inode *dir, struct page *ipage,
 	return 0;
 recover:
 	lock_page(ipage);
+	f2fs_wait_on_page_writeback(ipage, NODE, true);
 	memcpy(inline_dentry, backup_dentry, MAX_INLINE_DATA(dir));
 	f2fs_i_depth_write(dir, 0);
 	f2fs_i_size_write(dir, MAX_INLINE_DATA(dir));
Signature · 1 line
2.16.2.17.g38e79b1fd