Message ID | 20230606061901.1179970-1-chao@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3181527vqr; Mon, 5 Jun 2023 23:28:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Z70A4S3i4GUFnTI3pUWihxQgzW/GJhxMEf+PXZRM8jTqr4Q/7r3xOIK1syaywjrCKUIfS X-Received: by 2002:a17:90a:4304:b0:258:9180:1999 with SMTP id q4-20020a17090a430400b0025891801999mr1070221pjg.32.1686032890225; Mon, 05 Jun 2023 23:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686032890; cv=none; d=google.com; s=arc-20160816; b=0GwzXrMgiCnRY2gAztz5QkYXAY5xXYtY1RjVuCEG+q94dAygvnKQWH9m5Yd5nz9u3n +LpPm11jIMkHimHulEosRbqL7i1z2Wk4Bh5ZYg6tQc8QKimKlXckBwuPVyW9UkdiyTvH jmxiufQ49MLtJ5+G4mx6wHsAQxoiUXq1kF6CAjWKS9LLmrDGSfa/4KZU940v/BZZalMl TX5G2lOzCz5qE49cUfT77axRpw4tL9NsNVdnBkVHnuuB+2dCv9QXRMduaNR0drxVWOwv 3XCv3hQg8KbL3KwFhqnm6/8xBvX/69EI0iIqHPbRupkF/es0ZEXjfeeDJYa36C9PMPqp 9IWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aSrRl1VKMzdnJGIn1z6OFAGMbXdRUFBYi354p0ptm+g=; b=tZbJKZDLDsnwtb8gWfEcjlmfH0F2gj9vOQ9dq/m3cdX+anje/zS63iZ9JFviQ7Sj1A oacJhdG89LezvspwJO7j/mhSQ/7TRdTqfqdm9jH9U+fPeasaLI0/uY38Y6lxdsMlAwqg N3PxSWZdaLXpVc5EU4qsQV/KNlfiGC/QCtysYycdiykGX7pm99ayA6ETB5GIVKfg26MQ gpVuScxvTcufd8eKBn+kYptaU5eeLXw8gXajmHuyiI8g6iK9gp0TVsHnKTXk/cDq5TmZ Kn9B1XL6wBxWWjwSiscQWXXiwnMTAo6AcEcPKm4zzjdqSoux/W9xZuG2yUQlv4VGcKox PmwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iRmSnBbp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a17090a694600b00258f959be0csi5862448pjm.182.2023.06.05.23.27.58; Mon, 05 Jun 2023 23:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iRmSnBbp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234838AbjFFGTk (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Tue, 6 Jun 2023 02:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234807AbjFFGTQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Jun 2023 02:19:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C133610E3 for <linux-kernel@vger.kernel.org>; Mon, 5 Jun 2023 23:19:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4016F61015 for <linux-kernel@vger.kernel.org>; Tue, 6 Jun 2023 06:19:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C882C4331F; Tue, 6 Jun 2023 06:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686032345; bh=C6VkHFq2s9uK+TWCjxzRIUHXr213fU3r8aFIxm4ay+U=; h=From:To:Cc:Subject:Date:From; b=iRmSnBbpiE3CrgXLfeEeoAGIzXI2Vr1zU2SFIIibUVmjH+Cjkpb6JDLg6sD9nAjKv DwwHxdn8dCoFuvXxrEK/5TLodpuuW6VBotbXXJo8TgIK/loUBaCKZZY68hMja+9qgV 9DJ2AR0LU/XVolkeq6mTEMAkYyd1iZIjoCdttco/DdbVTyuHy3V3bBsIL3if07Eis9 i1uIbxNkevbUUpAszIf11V3P2sCrsjn2SAixelulzLLiZiBwtmYuJCTlBdC9PkKHoz k+qhb8/CJzWkPpCOJ2gDz5Qx7MvZpVo8s6inemrncOs5RuXbHt/WAq4wBD5Nxp+Dig 9E6j6tP2/pt0Q== From: Chao Yu <chao@kernel.org> To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu <chao@kernel.org> Subject: [PATCH] f2fs: check return value of freeze_super() Date: Tue, 6 Jun 2023 14:19:01 +0800 Message-Id: <20230606061901.1179970-1-chao@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767933623969041466?= X-GMAIL-MSGID: =?utf-8?q?1767933623969041466?= |
Series |
f2fs: check return value of freeze_super()
|
|
Commit Message
Chao Yu
June 6, 2023, 6:19 a.m. UTC
freeze_super() can fail, it needs to check its return value and do
error handling in f2fs_resize_fs().
Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS")
Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress")
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/gc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Tue, 6 Jun 2023 14:19:01 +0800 you wrote: > freeze_super() can fail, it needs to check its return value and do > error handling in f2fs_resize_fs(). > > Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS") > Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress") > Signed-off-by: Chao Yu <chao@kernel.org> > > [...] Here is the summary with links: - [f2fs-dev] f2fs: check return value of freeze_super() https://git.kernel.org/jaegeuk/f2fs/c/e6fd55c1f4b6 You are awesome, thank you!
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 8cbe4839f640..de893f4f60e1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -2271,7 +2271,9 @@ int f2fs_resize_fs(struct file *filp, __u64 block_count) if (err) return err; - freeze_super(sbi->sb); + err = freeze_super(sbi->sb); + if (err) + return err; if (f2fs_readonly(sbi->sb)) { thaw_super(sbi->sb);