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 || From patchwork Mon Jul 15 13:05:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13733530 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 5C3E1C3DA4B for ; Mon, 15 Jul 2024 13:07:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E2CD6B00A6; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94B936B00A9; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C4876B00A8; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2FBB26B00A6 for ; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C468880DCA for ; Mon, 15 Jul 2024 13:07:56 +0000 (UTC) X-FDA: 82342014552.06.5DC4825 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by imf18.hostedemail.com (Postfix) with ESMTP id 920121C0013 for ; Mon, 15 Jul 2024 13:07:53 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 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=sq+7WffXsw9R2PKkPB/mAhf8aUQXRW8fuR4ejmwJAAM=; b=f6M11IMoaxrMo1RSWxjsv7pG5VDftfNxcEKx6CTg9ZNvt5zQQRN55Txya6YB5/pwYwmesK J0oMp1YBp4XIDmRVwOU/xe7KHJ6UzYiTJmMYf8S3zYT48y41bU6YCufn35dAKml3OXAU76 98ozUhq+HwgfqS1OrK88iGnNmrENd6U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721048833; a=rsa-sha256; cv=none; b=VMIErkRY2RX530x/fXYGZVRCLM6Ng3uAeM5vG09swz0uoT8QH6NMJh0FKNJBF/mim9pKd8 07JZAaWFq8jXXwAe0TK3cRNUmlddWxxLw460CHmpR1X1aWVv8j6Tn8q0deQhkElha4fNgB asOe40V5TdC+Jq04/U9ATs0UOjbyKzw= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4WN2YN3mrfz4f3jRF for ; Mon, 15 Jul 2024 21:07:36 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 729621A0170 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--.61776S4; Mon, 15 Jul 2024 21:07:48 +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 2/4] quota: remove unneeded return value of register_quota_format Date: Mon, 15 Jul 2024 21:05:32 +0800 Message-Id: <20240715130534.2112678-3-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--.61776S4 X-Coremail-Antispam: 1UD129KBjvJXoWxXFy5WFyUJw13KF1fAr4fZrb_yoWrXF4xpw 1kCrs3tFyrtryDZ3yUXay5ury8W39rWF12vr48A3W2qrn09rW8Ar1UG34FvFy5Cry8Aw1Y qFn5C3W7Cw4jgrJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Kb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUXw A2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2AFwI0_Jw0_GFyl42xK82IYc2Ij64vIr4 1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK 67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI 8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAv wI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14 v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU2WrWUUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 920121C0013 X-Stat-Signature: hz7x5rg66abnfpkobhf5x6wfirh1fo58 X-Rspam-User: X-HE-Tag: 1721048873-402633 X-HE-Meta: U2FsdGVkX1+w51v/udVnpayBDijmx9Ry+/yTqL42uAViph57MHAlRDzTNTU/eEXTkxsMC1BFPBOIDsF7d2iHCM106IoXmGFkCjOI9GnagIk8P/nKssOoCJ1tK0Z5HMvOoiFZQ8WzR6WfyPVcKsvi0QHy3MYuE8xJcV28+ur7XC9G9ZCKFCmO1HpLDyTL9kTWeKgYOOUVA+2mJxIPv4roO8jjcbGCJ3vKr3bVbuP4lohBxI9lqKmkNjBLhVoiE5SbgIki6b6Lnp+DppgAvVmMhGozMHiL79DFcaUfXw2vDP5JdtN2txhMZ16IVBoswoIqaij279sHIPQ92vtXxhlQp7xHt31QUC7f3BGWTSq6DYqjcvI9KOBB+MVCfte5QfA41P0xjXBTmYM75yZlrIHgxOs9e6vs/LNJQVNJZLvioMr2VMFuIOEaofNQnYAPGCN+tLomfZivh1oQL+nEDrsTyQ9lklSK1fOfTstGCtTo0dGQGAnVsFSjOjhgQtCJQfI+AAJWdS2bMxJD8AhpLt42XwrLJGn66eduZYFmA1JvXq8eWwUuNCmsRIM6yJ2FfHAw1w2wBB/YYfU3V6xXwaK5G1p+x1KW9hg9coNkJh/SDnPikTMfauYVuQ6gfBu3yDEMrIUOf+deTK46w8avUATQ93h2jYBe8524Ta541ffkla/L85qyIo4Gt5F8cAJNwHAwjvY9YC1wK0SPcOB9qkY44uqdxeRYYUcBK5gfM/HaFx0H4WwJTmukhYvU0eT42V7zsQew5EJ2jiAKKdazm5mjyyhOmN5Lcq27rm0bk/7AhmSnOKRS3JX91ynS5NKsKh4rFnc8y333sfinUcKZeYLq8kfXlNUTPdc9qzPMdo/sk5Vj/IZVJYf1iIbSNRfrPP8TmZ787RjdHQaeZ0JLiAW2iWfmqjj9H9LTrdcPmrUWwzoMf1eFf+ueJEnEDksJItNO71Jbv8lA55Wog7Sl1vj +SVSvqDw 9waKi7YmnjLXVBVZ5Q4fXp80ZmkSSNARohudiOpD0rxfcW04cJZR6BYPxEgcgJx8ixGnPl080Ah8gClvnBRTNiCGBdBwHBqGjSaxEEKmtQ8/4ugEhxaZ0oalxwGimk1p1R2maT0Q7DIBdlcg2FJ73aPDhn4wiIokK/TFmvJR/3QdtNRXnDM3WyLMR7Qgxjy8fCocGg+aXH7utJQp8b3TYAaklkg== 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: The register_quota_format always returns 0, simply remove unneeded return value. Signed-off-by: Kemeng Shi Reviewed-by: Joseph Qi --- fs/ocfs2/super.c | 6 ++---- fs/quota/dquot.c | 3 +-- fs/quota/quota_v1.c | 3 ++- fs/quota/quota_v2.c | 9 +++------ include/linux/quota.h | 2 +- mm/shmem.c | 7 +------ 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index afee70125ae3..73caa8914ebe 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -1571,15 +1571,13 @@ static int __init ocfs2_init(void) ocfs2_set_locking_protocol(); - status = register_quota_format(&ocfs2_quota_format); - if (status < 0) - goto out3; + register_quota_format(&ocfs2_quota_format); + status = register_filesystem(&ocfs2_fs_type); if (!status) return 0; unregister_quota_format(&ocfs2_quota_format); -out3: debugfs_remove(ocfs2_debugfs_root); ocfs2_free_mem_caches(); out2: diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 23fcf9e9d6c5..a08a71890cd8 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -163,13 +163,12 @@ static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES; /* SLAB cache for dquot structures */ static struct kmem_cache *dquot_cachep; -int register_quota_format(struct quota_format_type *fmt) +void register_quota_format(struct quota_format_type *fmt) { spin_lock(&dq_list_lock); fmt->qf_next = quota_formats; quota_formats = fmt; spin_unlock(&dq_list_lock); - return 0; } EXPORT_SYMBOL(register_quota_format); diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c index 3f3e8acc05db..6f7f0b4afba9 100644 --- a/fs/quota/quota_v1.c +++ b/fs/quota/quota_v1.c @@ -235,7 +235,8 @@ static struct quota_format_type v1_quota_format = { static int __init init_v1_quota_format(void) { - return register_quota_format(&v1_quota_format); + register_quota_format(&v1_quota_format); + return 0; } static void __exit exit_v1_quota_format(void) diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c index c48c233f3bef..1fda93dcbc1b 100644 --- a/fs/quota/quota_v2.c +++ b/fs/quota/quota_v2.c @@ -440,12 +440,9 @@ static struct quota_format_type v2r1_quota_format = { static int __init init_v2_quota_format(void) { - int ret; - - ret = register_quota_format(&v2r0_quota_format); - if (ret) - return ret; - return register_quota_format(&v2r1_quota_format); + register_quota_format(&v2r0_quota_format); + register_quota_format(&v2r1_quota_format); + return 0; } static void __exit exit_v2_quota_format(void) diff --git a/include/linux/quota.h b/include/linux/quota.h index 07071e64abf3..89a0d83ddad0 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -526,7 +526,7 @@ struct quota_info { const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ }; -int register_quota_format(struct quota_format_type *fmt); +void register_quota_format(struct quota_format_type *fmt); void unregister_quota_format(struct quota_format_type *fmt); struct quota_module_name { diff --git a/mm/shmem.c b/mm/shmem.c index a8b181a63402..d27104e1af9b 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4660,11 +4660,7 @@ void __init shmem_init(void) shmem_init_inodecache(); #ifdef CONFIG_TMPFS_QUOTA - error = register_quota_format(&shmem_quota_format); - if (error < 0) { - pr_err("Could not register quota format\n"); - goto out3; - } + register_quota_format(&shmem_quota_format); #endif error = register_filesystem(&shmem_fs_type); @@ -4693,7 +4689,6 @@ void __init shmem_init(void) out2: #ifdef CONFIG_TMPFS_QUOTA unregister_quota_format(&shmem_quota_format); -out3: #endif shmem_destroy_inodecache(); shm_mnt = ERR_PTR(error); From patchwork Mon Jul 15 13:05:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13733529 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 11443C3DA59 for ; Mon, 15 Jul 2024 13:07:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 750716B00A7; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D4E96B00AA; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 528AD6B00A9; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2EDB06B00A4 for ; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C498C1415C3 for ; Mon, 15 Jul 2024 13:07:56 +0000 (UTC) X-FDA: 82342014552.05.BB55111 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by imf14.hostedemail.com (Postfix) with ESMTP id 0D50F10001C for ; Mon, 15 Jul 2024 13:07:53 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 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=UNZjcRWWNHXfmFdQ8lLBxxCk8lkn9oiuXVBZb3iyXoI=; b=hdnLgVBn+VTGsSGI56KAZCg7pfkL6jD9uSlkR62G8QefoWUmKngRRvpeQ0C9shEQ7/f71m iPBEMeD73O+Im4Zkq0jHZlGq1R+D8WGMdC3HsJ9Fh60ZindTaDJuv9a5AkBYIaNE02aJiq 1CZOkWGzl8NFhw+58Piba2zFFV8CIp4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721048833; a=rsa-sha256; cv=none; b=gmGifxaGm3dqsromSOTu1cWGYkNk33NVUNQP1wAGqJzeCtMyEntTCxMiAvBiY3bQDTFpWT u7OiTMqifmT/HwAClyYO6YlHGz7+NLhv1teo9lUBosRY9rYjBKNCmaFi6y8j5JhEEvgEM7 ZIwxXFvi0j/XMEaWA/PHbIK9UsQdoto= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4WN2YN736wz4f3jJC for ; Mon, 15 Jul 2024 21:07:36 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id E19D41A0572 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--.61776S5; Mon, 15 Jul 2024 21:07:48 +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 3/4] quota: remove redundant return at end of void function Date: Mon, 15 Jul 2024 21:05:33 +0800 Message-Id: <20240715130534.2112678-4-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--.61776S5 X-Coremail-Antispam: 1UD129KBjvdXoWrury3ZryfXr4rur1fCF4xtFb_yoWDJFX_Cr yfu34Fyr4Ut3Z3tFWUtr4rJwnaqws8Cw1UXF47t3W3Gw1rtrW8Ar1qvwn3JryDJ347C3y3 CrW8CrsrGFWrKjkaLaAFLSU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+8ERkzA2nHaok+O382QlvsGR6Q++ag4TmGkmR1L/gKgCcFREljN7TARFkTCZXGzl7Ano7SvosznV09j2JDKUVNIJTLyy7z+CiKCnMSs1/ORUhes4= 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: Function dquot_claim_space_nodirty nad dquot_reclaim_space_nodirty have no return value, just remove redundant return at end of the functions. Signed-off-by: Kemeng Shi --- fs/quota/dquot.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index a08a71890cd8..2ca1f16689de 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1830,7 +1830,6 @@ void dquot_claim_space_nodirty(struct inode *inode, qsize_t number) spin_unlock(&inode->i_lock); mark_all_dquot_dirty(dquots); srcu_read_unlock(&dquot_srcu, index); - return; } EXPORT_SYMBOL(dquot_claim_space_nodirty); @@ -1872,7 +1871,6 @@ void dquot_reclaim_space_nodirty(struct inode *inode, qsize_t number) spin_unlock(&inode->i_lock); mark_all_dquot_dirty(dquots); srcu_read_unlock(&dquot_srcu, index); - return; } EXPORT_SYMBOL(dquot_reclaim_space_nodirty); From patchwork Mon Jul 15 13:05:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13733533 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 84011C3DA4B for ; Mon, 15 Jul 2024 13:08:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3FB246B00A9; Mon, 15 Jul 2024 09:07:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DE696B00AC; 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 EC45D6B00A9; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B89576B00A4 for ; Mon, 15 Jul 2024 09:07:57 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 4D13C1A0F0D for ; Mon, 15 Jul 2024 13:07:57 +0000 (UTC) X-FDA: 82342014594.20.FA507B3 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by imf18.hostedemail.com (Postfix) with ESMTP id 0A5121C0025 for ; Mon, 15 Jul 2024 13:07:53 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.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=1721048838; 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=ZGufKUrngVpIKdfPetZhExONsQPyAFgA7GZ77YjGsU4=; b=Jnb6mzOUKfjXWjfeQTdFrtvmzcZUcjPSNBOdU4EMh9pGYnJx7lgahB0eOrA1Xgh9rrigIS GeL09dHi63xrk4DrVhIdXqaTCewWLPAo3qKNXSlD67i5YNPIftsO3JHqsPoZaaRZMi7Jrz BUiCf8Wc9EXW9V/U0Whe6ApD1bJmKmE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721048838; a=rsa-sha256; cv=none; b=UzodkK7woLrE4NyYp9c+YBzSpp5QCaeP72BJYO3Dm9WST4e/m0DiIu7E/WZRtPQgGwJc13 6I1R1v7VfnxLA3HubSJlH4CmWVWh1uVJZ/d/9CS+olFse7lgtfSxqPTmDnJhqyWAj8+7vI sqeZWXz9BvzimIjT3Sjc/TcKxThwP9s= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.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.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4WN2YN1Y1Nz4f3mJJ for ; Mon, 15 Jul 2024 21:07:36 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 552FB1A0572 for ; Mon, 15 Jul 2024 21:07:49 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgBHKzkhH5VmjCPSAA--.61776S6; Mon, 15 Jul 2024 21:07:49 +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 4/4] quota: remove unnecessary error code translation in dquot_quota_enable Date: Mon, 15 Jul 2024 21:05:34 +0800 Message-Id: <20240715130534.2112678-5-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--.61776S6 X-Coremail-Antispam: 1UD129KBjvdXoWruF1UGFW7CF4DGw4kWry8Zrb_yoWDAwb_Ca 1I93ykZF48ur4S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n+ki ZdL2ehG2 4md0/EEeThpq58OkdJ+GlTSYHADV+b2yHZB7aqESAXl+5F7Irny1Ivc3UJwgJ5cnuiJMBLlgfTK1neKeiWljoOGcjvf4V6Tid3r/Ka0JAtl6TvQEPXHQsBIiBS4fwPgZ/F1TZ0KHjTME20IjNLP5BjXiVux37D65CywKR08QoYI9KfR6IuazvxzvF4xDUHjHN6zFlqEc6wmyBB18Sj2E6OtoYaw== 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: Simply set error code to -EEXIST when quota limit is already enabled in dquot_quota_enable to remove unnecessary error code translation. Signed-off-by: Kemeng Shi --- fs/quota/dquot.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 2ca1f16689de..fdf19360ffc9 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2598,7 +2598,8 @@ static int dquot_quota_enable(struct super_block *sb, unsigned int flags) goto out_err; } if (sb_has_quota_limits_enabled(sb, type)) { - ret = -EBUSY; + /* compatible with XFS */ + ret = -EEXIST; goto out_err; } spin_lock(&dq_state_lock); @@ -2612,9 +2613,6 @@ static int dquot_quota_enable(struct super_block *sb, unsigned int flags) if (flags & qtype_enforce_flag(type)) dquot_disable(sb, type, DQUOT_LIMITS_ENABLED); } - /* Error code translation for better compatibility with XFS */ - if (ret == -EBUSY) - ret = -EEXIST; return ret; }