Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2789696lqo; Mon, 20 May 2024 17:58:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUryJ+8aBhRlK/jcmHcMWf2sICZZtSKdAHp55TNZs1C84tG3kmkFw17MAx5xSR00z0zVM0n12fsD5HF1cxjlBVCofgqutQqQR9Jww7pzA== X-Google-Smtp-Source: AGHT+IFL4K7AJBuvuyIhDrme/JKPPiW/aQS60tpjoDFSRG70jmZHdQHLgsim5sgYgdUmmIWkoT1o X-Received: by 2002:a17:90a:db89:b0:2b6:208c:2aee with SMTP id 98e67ed59e1d1-2bd6040a557mr10449126a91.20.1716253127559; Mon, 20 May 2024 17:58:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716253127; cv=pass; d=google.com; s=arc-20160816; b=h3F8//cnxu2eMZH65xeUZCs249OzdNrfQBKh1MskIz1IntQcmfnBcymwGuVkEfwmEk L0z5e9cShKAD8SivTs0PAAU/ezta9qZwLjdZAvXGcZsCi6wGte4nbBccG/U7we/3KHzx 2roD7rcmUOOp3q+bZFnK9ONhB/YWx5Peqq1n50aV7/OvKiA+L1eWmB4PqWTCONa95E23 WBIKdktDDz9odtThxpSyhjZ0+Obt6Z6qKSNJlSDcSXuhOn+a9dwDuOxnHV6YCXaICrJV wFeweIV36Ld+a2pN4s8iH3KIYuNPHWj12Qoh5K9JHEe4s8pwnET8pEWhWI5SbpMJUOs0 ZyxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=SDFjVEIxnzzbbdCDf35cR3KZt93rZh1X8rbzHgZqemI=; fh=B6MDbgWDp/U2Og606pVmHQVSrblo1MXKh5Ru/w8EnUY=; b=xxv0JSLKSKcIfn++fsvktDvy2moDtOunHpp7C2IXe4NfZYhQX3ixFtLWyPgLVQF5K2 5zBXOp0Pya09tbXpYpRPzZFjjv1E9sPCSgjJ/rn1jx0p7e30ZGBAzfwasWKoO676ECPW KQbBMoLi6I8Qr+L9GS4mbFf0uGqloqDo898JBh7Scwyzr5LtqMRyKm5nthskwAPNz+sk fr0mQWdLGzp3GNrg3jjRulaGEE3tbrcKh2uhpTwRNT7dYBVTaSFzhmmVJ407VyDjTW9H DEKirHfw/AFj83uBcl6HTmEHF5JHKc/5pP0/31z+qxgnq3+8st+rkClycKiEQdkp6W1W QsUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M5WVv8gR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-184328-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bd5e0dc696si5334198a91.5.2024.05.20.17.58.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 17:58:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184328-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M5WVv8gR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-184328-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 093F6B2156B for ; Tue, 21 May 2024 00:57:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D180A6125; Tue, 21 May 2024 00:56:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M5WVv8gR" Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6ED08441F for ; Tue, 21 May 2024 00:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716253019; cv=none; b=ZBJEIM08iTI/80eSaHYTWZe3K/nx6ohq3gVwkWMowBTCBQUm6mxZBqY+NEZTuQ4q+33hjwRuhMn3bG4D7LU1F8OXeGX6TKRxIHWEAWf/WH1+Z0MozORkL6Fsx4Bkudnu8rd3Bo8+WWRupq4o1eHuc+gQcmo4c7UO4born/x34Lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716253019; c=relaxed/simple; bh=TKeol2dSxBk49iqQ//cAEQqUVFfMbeJOo24PAoZct6Y=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IoV7ONlLOc2/tYC0SYfVzbDFYJ/eYaLn+unfYsAu5fCX+DWGKsz2ZJqhWGxqbO/mqZ9QJ/7GPVykJixApo20cd42Dx92jBcIs0u7S8m3ZsCyjCRPn/krqybgSUYM27n8Bj0SBYVL0EjBBaU/xA/b1HUq+EgUzI3WlhCiCLZFfqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M5WVv8gR; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-34d7d04808bso2211622f8f.0 for ; Mon, 20 May 2024 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716253016; x=1716857816; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SDFjVEIxnzzbbdCDf35cR3KZt93rZh1X8rbzHgZqemI=; b=M5WVv8gR8EPeY1gVnLqxUKIdrDJMO1Ln1ndiePc8BzPwJmCgsTyv+7GrIV8iyBpBIW luEIHiqWI2KRIrjOBwvfyRfjTwd6BxaNFwFRQGA88ujCJLhqOSXrPyJZim/EVJmxvgv+ S55QvDND34vx4oR4ZKYoaoqD56HBexE6amszSf9Vk3KCbUwY2Tl7i2Nl2/XcPSIs0w1Z T0G2eflyQOFDWVJKvs1cxvtvg2oCFFVzkJyBoV3+2W8WcyEGON4RB2fDtOh31GUe3nSd XIaqd29BsxYcE3EH30Lkr6Q4gXwl3KCfdmqh6lW3c01TZjXxexTLWYCD5jbffNPmz5AX uFTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716253016; x=1716857816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SDFjVEIxnzzbbdCDf35cR3KZt93rZh1X8rbzHgZqemI=; b=ihYvFGhdpSjqozpiYuAg9xv/PsRcCC/iV5i5r4G4z0URsIr1ER/jRmqYpSfexk8tlz aYAgHcaQ39Pt0CwerPdzROXzLpqr+iTNDbI46ajti6k34ZoXCmzge/G4axW4tdHYNcG8 R8GpHWKxSj9KyO3h4ABMChFhTjASJcN4XWP2aJ84EByieGO6neRCzXDhxB0HTJBsWAfN c5qEgA68N0bJ/gX+Qos0l8trjIo+j1RBrvR3DqREq1i5v6BbB33MxjCDHh2S9ezrLkSz 32XyuF3sq+AdtzBJGNPOGC8PdmaYtRs/X/eFbrgJjQlxg1R0N/ZmNfCspl559mn4IxZb I7Gw== X-Forwarded-Encrypted: i=1; AJvYcCU24VQDgOoOw0rYmVxjBV3UyJwjgUFOprVoZ0Ai5MgQHStzv5KYxdrpezVuosZLI0YndYzvZi6gsR9HN2Q8WS6EC7eyPlb3RoDi0JeW X-Gm-Message-State: AOJu0Yy3XJyblRIf9ArJK0ElVgJqlDfQ5Tjpdg9BUO+ilDNLHUb7wJ9L KXvd36Dc9E/EnAuBJMMJXhn0N3+6MEpyt6uZYGpnJ/X9QVDAhYM7bv8DIjy/DMKKjR8jfO9fFcM pdzAjkW+2uqdP8EnDXuz66zvQQR8= X-Received: by 2002:adf:e586:0:b0:34f:3293:85c6 with SMTP id ffacd0b85a97d-3504a96b7c9mr31557621f8f.64.1716253015538; Mon, 20 May 2024 17:56:55 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1715945202-30045-1-git-send-email-zhiguo.niu@unisoc.com> In-Reply-To: From: Zhiguo Niu Date: Tue, 21 May 2024 08:56:44 +0800 Message-ID: Subject: Re: [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section To: Jaegeuk Kim Cc: Zhiguo Niu , chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, ke.wang@unisoc.com, Hao_hao.Wang@unisoc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 21, 2024 at 3:52=E2=80=AFAM Jaegeuk Kim wr= ote: > > On 05/17, Zhiguo Niu wrote: > > commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_c= urseg()") > > missed this allocated path, fix it. > > > > Signed-off-by: Zhiguo Niu > > --- > > 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_s= b_info *sbi, int type) > > if (cs->next_blkoff) { > > unsigned int old_segno =3D cs->segno, old_blkoff =3D cs->= next_blkoff; > > > > - f2fs_allocate_new_section(sbi, type, true); > > + err =3D 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? Hi Jaegeuk, No I did not have a real issue related to this, just found it by code revie= w. it is ok not to apply this for me . thanks a lot. > > > 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