From patchwork Mon Jul 15 13:05:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13733532 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B19FC3DA4B for ; Mon, 15 Jul 2024 13:08:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 184266B00A4; Mon, 15 Jul 2024 09:07:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E4A86B00AA; Mon, 15 Jul 2024 09:07:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DDBBB6B00AC; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id AC0BC6B00AA for ; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 01D41A1626 for ; Mon, 15 Jul 2024 13:07:56 +0000 (UTC) X-FDA: 82342014594.19.A0B786F Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by imf16.hostedemail.com (Postfix) with ESMTP id 623BB180026 for ; Mon, 15 Jul 2024 13:07:53 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721048833; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RDg0Jts/YhLovEVTL8bqzgh/38rNKY3j066OQ85lqg8=; b=lZuIMsyHJxEwSpgoyi/bu5yadlp7LnP+y12RB4nS75XVHBJMs32zHoWltsQq03nWtABTnQ z4Y8V+WrVm6Y1USOE9lNBO5+SgLxJGECsg/6WHhBIi4FeZdQxFy/sxeNxw1nETLctJK1yH oDM7xKGmuQtIKRZunDdW6aZ9QCRui/g= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721048833; a=rsa-sha256; cv=none; b=q1XMZDaqbLPZljwBdKfEcnFEOQHVYOdjawonXhYFbQce+BBtA1TuMHNJXtiR/KnNTuAHOi i5+gh3Z6NBmU/1f1khmR9x7871wQRjC2wtYseFfQSbqD7SOPWIS8okaRkuRfnIsog6rchl aHnWHUtOg2PnrR3hySwfokc50naNQaE= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4WN2YS18h1z4f3kKg for ; Mon, 15 Jul 2024 21:07:40 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 130B51A0170 for ; Mon, 15 Jul 2024 21:07:48 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgBHKzkhH5VmjCPSAA--.61776S3; Mon, 15 Jul 2024 21:07:47 +0800 (CST) From: Kemeng Shi To: jack@suse.com Cc: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, hughd@google.com, akpm@linux-foundation.org, ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/4] quota: avoid missing put_quota_format when DQUOT_SUSPENDED is passed Date: Mon, 15 Jul 2024 21:05:31 +0800 Message-Id: <20240715130534.2112678-2-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240715130534.2112678-1-shikemeng@huaweicloud.com> References: <20240715130534.2112678-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: gCh0CgBHKzkhH5VmjCPSAA--.61776S3 X-Coremail-Antispam: 1UD129KBjvdXoW7XF45GFyDAryfWFW3XF1rXrb_yoWDWrg_K3 4Ik3y8ZFWxXF9ag3WqgrWfWrZ09ayrGws3WF4jyrnrJryDGr45ZF4vqF9xAa4kZ3y7t398 Zas2yry7KFWrWjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbTxYFVCjjxCrM7AC8VAFwI0_Xr0_Wr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r18M2 8IrcIa0xkI8VCY1x0267AKxVWUCVW8JwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK 021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F 4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0 oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7V C0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j 6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMx C20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E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7b3KfOMf1uY2U9BD1kiGSfCmmxkVRaqFUpGywSi00pXg3ABHTXNm4u9Uyd8q5kW11Wnhp1VsT/sS48PPNhLHo6OoS0cYeJ5iezucr6C3aW0qq3ks0MUZAhOVc6aWbtlHDTz7Kp1HOi0p3Szym3S/Mel5ekfT6Gra1lY+MY6VyRBQ1mU/ORcEWitDRZkp+e5cuhnAv/RBkakSzlH8viicvnscnS8m6kvJYyfj0ZcAq3A1gQHim9et+v8Y9kyTXzjU7JBRPVCjvuThevTLWJqeENyR7HS4+dG6wGNDueNMi/7SRW6tYaCSSXdr8SYpbD4sDRYQsP3R8+/yxOZQYW3Jue0HkxUIaH1JCruUAUTgeQjbpdo45 pJpvV/vQ Cp0PW2RBNBrs31vbq/LkaI3ncZzy/mEVxuv2+E8dmKiMzn8JDXFNja0oNwy/0LEjSnA1jHP16srIygNpq/s6s5B1+N/PIzoLHZJGnYlJj4/aVpQ1Z4HFusqVgHzPZNKhJhOBeieuXkWJw5dCAHRbGxRm/HY87hynVqiohC9Btf/hD6bHFSDvEt+nsexCNhQEcugBH/7XuTlAZPnan7tCVFloH04E2kBC+qyJiRUIg5mYkFxMeokoFtqA3Tg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Avoid missing put_quota_format when DQUOT_SUSPENDED is passed to dquot_load_quota_sb. Signed-off-by: Kemeng Shi Reviewed-by: Joseph Qi --- fs/quota/dquot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 627eb2f72ef3..23fcf9e9d6c5 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2408,7 +2408,7 @@ static int vfs_setup_quota_inode(struct inode *inode, int type) int dquot_load_quota_sb(struct super_block *sb, int type, int format_id, unsigned int flags) { - struct quota_format_type *fmt = find_quota_format(format_id); + struct quota_format_type *fmt; struct quota_info *dqopt = sb_dqopt(sb); int error; @@ -2418,6 +2418,7 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id, if (WARN_ON_ONCE(flags & DQUOT_SUSPENDED)) return -EINVAL; + fmt = find_quota_format(format_id); if (!fmt) return -ESRCH; if (!sb->dq_op || !sb->s_qcop ||