linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: fix missing up_read
@ 2018-09-28 17:48 Jaegeuk Kim
  2018-09-28 17:48 ` [PATCH 2/2] f2fs: keep lazytime on remount Jaegeuk Kim
  2018-09-29  2:05 ` [f2fs-dev] [PATCH 1/2] f2fs: fix missing up_read Chao Yu
  0 siblings, 2 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2018-09-28 17:48 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim, stable

This patch fixes missing up_read call.

Fixes: c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area")
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/node.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 3994b44541b4..acb819b8fc42 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -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;
-- 
2.19.0.605.g01d371f741-goog


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

* [PATCH 2/2] f2fs: keep lazytime on remount
  2018-09-28 17:48 [PATCH 1/2] f2fs: fix missing up_read Jaegeuk Kim
@ 2018-09-28 17:48 ` Jaegeuk Kim
  2018-09-29 10:44   ` [f2fs-dev] " Chao Yu
  2018-09-29  2:05 ` [f2fs-dev] [PATCH 1/2] f2fs: fix missing up_read Chao Yu
  1 sibling, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2018-09-28 17:48 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

This patch fixes losing lazytime when remounting f2fs.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 603386525336..74056fa064ff 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -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) {
-- 
2.19.0.605.g01d371f741-goog


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

* Re: [f2fs-dev] [PATCH 1/2] f2fs: fix missing up_read
  2018-09-28 17:48 [PATCH 1/2] f2fs: fix missing up_read Jaegeuk Kim
  2018-09-28 17:48 ` [PATCH 2/2] f2fs: keep lazytime on remount Jaegeuk Kim
@ 2018-09-29  2:05 ` Chao Yu
  1 sibling, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-09-29  2:05 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel; +Cc: stable

On 2018/9/29 1:48, Jaegeuk Kim wrote:
> This patch fixes missing up_read call.

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.

> 
> Fixes: c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area")
> Cc: <stable@vger.kernel.org> # 4.19+
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,



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

* Re: [f2fs-dev] [PATCH 2/2] f2fs: keep lazytime on remount
  2018-09-28 17:48 ` [PATCH 2/2] f2fs: keep lazytime on remount Jaegeuk Kim
@ 2018-09-29 10:44   ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2018-09-29 10:44 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel

On 2018/9/29 1:48, Jaegeuk Kim wrote:
> This patch fixes losing lazytime when remounting f2fs.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


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

end of thread, other threads:[~2018-09-29 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28 17:48 [PATCH 1/2] f2fs: fix missing up_read Jaegeuk Kim
2018-09-28 17:48 ` [PATCH 2/2] f2fs: keep lazytime on remount Jaegeuk Kim
2018-09-29 10:44   ` [f2fs-dev] " Chao Yu
2018-09-29  2:05 ` [f2fs-dev] [PATCH 1/2] f2fs: fix missing up_read Chao Yu

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).