linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: no need lock_op in f2fs_write_inline_data
@ 2017-02-23 12:31 Yunlei He
  2017-02-23 19:45 ` Jaegeuk Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Yunlei He @ 2017-02-23 12:31 UTC (permalink / raw)
  To: jaegeuk, yuchao0, linux-f2fs-devel

Similar as f2fs_write_inode, f2fs_write_inline_data just
mark inode page dirty, so it's no need to write inline data
under read lock of cp_rwsem.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
---
 fs/f2fs/data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 5f3bc98..836a15a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1414,9 +1414,9 @@ static int __write_data_page(struct page *page, bool *submitted,
 		goto redirty_out;
 
 	err = -EAGAIN;
-	f2fs_lock_op(sbi);
 	if (f2fs_has_inline_data(inode))
 		err = f2fs_write_inline_data(inode, page);
+	f2fs_lock_op(sbi);
 	if (err == -EAGAIN)
 		err = do_write_data_page(&fio);
 	if (F2FS_I(inode)->last_disk_size < psize)
-- 
2.10.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-25  2:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 12:31 [PATCH] f2fs: no need lock_op in f2fs_write_inline_data Yunlei He
2017-02-23 19:45 ` Jaegeuk Kim
2017-02-24  3:29   ` heyunlei
2017-02-24 19:58     ` Jaegeuk Kim
2017-02-25  0:59       ` Chao Yu
2017-02-25  1:58         ` heyunlei
2017-02-25  2:10         ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).