lkml.org 
[lkml]   [2016]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] f2fs: fix to update node page under cp_rwsem
Date
From: Chao Yu <yuchao0@huawei.com>

Update node page under cp_rwsem in order to keep data consistency
during writting checkpoint.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/inode.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 9ac5efc..1057c73 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -377,8 +377,11 @@ retry:
goto retry;
}

- if (err)
+ if (err) {
+ f2fs_lock_op(sbi);
update_inode_page(inode);
+ f2fs_unlock_op(sbi);
+ }
sb_end_intwrite(inode->i_sb);
no_delete:
stat_dec_inline_xattr(inode);
--
2.7.2
\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.418 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site