]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
quota: remove unneeded return value of register_quota_format
authorKemeng Shi <shikemeng@huaweicloud.com>
Mon, 20 Oct 2025 16:16:04 +0000 (12:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Oct 2025 14:16:41 +0000 (16:16 +0200)
[ Upstream commit a838e5dca63d1dc701e63b2b1176943c57485c45 ]

The register_quota_format always returns 0, simply remove unneeded return
value.

Link: https://patch.msgid.link/20240715130534.2112678-3-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Stable-dep-of: 72b7ceca857f ("fs: quota: create dedicated workqueue for quota_release_work")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ocfs2/super.c
fs/quota/dquot.c
fs/quota/quota_v1.c
fs/quota/quota_v2.c
include/linux/quota.h
mm/shmem.c

index e585e77cdc88e1276b4e83979f6b7ec39c012c71..18dba873a1633f28b9ecf54f0acd86a4577bc88e 100644 (file)
@@ -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:
index 67562c78e57d53f0c032e302e0b30e1575ad87c6..ba227502b03d7fe99665d1c8d0a74478ff8d79e9 100644 (file)
@@ -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);
 
index a0db3f195e9511adc81f2791af3109b7f3a267ac..8aaf4a501fc0d974b3bcfae68fd8f79c6ff19bf8 100644 (file)
@@ -229,7 +229,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)
index 7978ab671e0c6ade7a5c1b918d0b58a16c3e7164..d73f44329277194c1a6984ddbca51355b13b6f6e 100644 (file)
@@ -422,12 +422,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)
index 07071e64abf3d66298680b829a2d3b251ebbde5d..89a0d83ddad082e505b38765b4d84a3d1dd54297 100644 (file)
@@ -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 {
index ecf1011cc3e296fee5cc560670cff6a7793adfaf..2260def68090c7d8c1f0d922bb08e065b0b9a708 100644 (file)
@@ -4617,11 +4617,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);
@@ -4650,7 +4646,6 @@ out1:
 out2:
 #ifdef CONFIG_TMPFS_QUOTA
        unregister_quota_format(&shmem_quota_format);
-out3:
 #endif
        shmem_destroy_inodecache();
        shm_mnt = ERR_PTR(error);