f2fs: fix missing up_read
Subsystems (2)
Jaegeuk Kim
maintainerPATCH 1/2 f2fs: fix missing up_read
This patch fixes missing up_read call.
Fixes c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area")
Cc <[email protected]> # 4.19+
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/f2fs/node.c +3 -1
@@ -1541,8 +1541,10 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, }if (__is_valid_data_blkaddr (ni.blk_addr) && - !f2fs_is_valid_blkaddr (sbi, ni.blk_addr,DATA_GENERIC )) + !f2fs_is_valid_blkaddr (sbi, ni.blk_addr,DATA_GENERIC )) { +up_read (&sbi->node_write); goto redirty_out; + }if (atomic && !test_opt (sbi,NOBARRIER )) fio.op_flags |=REQ_PREFLUSH |REQ_FUA ;
Signature · 1 line
2.19.0.605.g01d371f741-goog
Jaegeuk Kim
maintainerPATCH 2/2 f2fs: keep lazytime on remount
This patch fixes losing lazytime when remounting f2fs.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+)
fs/f2fs/super.c +1 -0
@@ -1655,6 +1655,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)limit_reserve_root (sbi);clear_sbi_flag (sbi,SBI_IS_MOUNT ); + *flags = (*flags & ~SB_LAZYTIME ) | (sb->s_flags &SB_LAZYTIME );return 0 ; restore_gc:if (need_restart_gc) {
Signature · 1 line
2.19.0.605.g01d371f741-goog
Re: [f2fs-dev] [PATCH 2/2] f2fs: keep lazytime on remount
Quoted 3 lines · Jaegeuk Kim
This patch fixes losing lazytime when remounting f2fs.
Signed-off-by Jaegeuk Kim <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,
Quoted 1 line · Jaegeuk Kim
This patch fixes missing
up_readcall.
I guess we need to add additional type of error injection to simulate on-disk blkaddr corruption, then we can cover all those error paths.
Quoted 4 lines
Fixes c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area")Cc <[email protected]> # 4.19+Signed-off-by Jaegeuk Kim <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,