[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zkup-c2K74bxVJ0i@google.com>
Date: Mon, 20 May 2024 19:52:25 +0000
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Zhiguo Niu <zhiguo.niu@...soc.com>
Cc: chao@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, niuzhiguo84@...il.com,
ke.wang@...soc.com, Hao_hao.Wang@...soc.com
Subject: Re: [PATCH] f2fs: fix to check return value of
f2fs_allocate_new_section
On 05/17, Zhiguo Niu wrote:
> commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> missed this allocated path, fix it.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@...soc.com>
> ---
> fs/f2fs/segment.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index a0ce3d0..71dc8042 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
> if (cs->next_blkoff) {
> unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
>
> - f2fs_allocate_new_section(sbi, type, true);
> + err = f2fs_allocate_new_section(sbi, type, true);
> + if (err)
> + return err;
I hesitate to apply this, since this may give mount failures forever. Do you see
a real issue with this?
> f2fs_notice(sbi, "Assign new section to curseg[%d]: "
> "[0x%x,0x%x] -> [0x%x,0x%x]",
> type, old_segno, old_blkoff,
> --
> 1.9.1
Powered by blists - more mailing lists