]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ext4: remove unused return value of __mb_check_buddy
authorKemeng Shi <shikemeng@huaweicloud.com>
Fri, 5 Jan 2024 09:20:54 +0000 (17:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:34 +0000 (13:09 +0100)
[ Upstream commit 133de5a0d8f8e32b34feaa8beae7a189482f1856 ]

Remove unused return value of __mb_check_buddy.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240105092102.496631-2-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: d9ee3ff810f1 ("ext4: improve integrity checking in __mb_check_buddy by enhancing order-0 validation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/mballoc.c

index 1a8d72c5e327ac5ad4a42c7e8041623a789e6e57..93ff3220511e75a0055709717e74015693d92b5c 100644 (file)
@@ -663,7 +663,7 @@ do {                                                                        \
        }                                                               \
 } while (0)
 
-static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
+static void __mb_check_buddy(struct ext4_buddy *e4b, char *file,
                                const char *function, int line)
 {
        struct super_block *sb = e4b->bd_sb;
@@ -682,7 +682,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
        void *buddy2;
 
        if (e4b->bd_info->bb_check_counter++ % 10)
-               return 0;
+               return;
 
        while (order > 1) {
                buddy = mb_find_buddy(e4b, order, &max);
@@ -747,7 +747,7 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
 
        grp = ext4_get_group_info(sb, e4b->bd_group);
        if (!grp)
-               return NULL;
+               return;
        list_for_each(cur, &grp->bb_prealloc_list) {
                ext4_group_t groupnr;
                struct ext4_prealloc_space *pa;
@@ -757,7 +757,6 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
                for (i = 0; i < pa->pa_len; i++)
                        MB_CHECK_ASSERT(mb_test_bit(k + i, buddy));
        }
-       return 0;
 }
 #undef MB_CHECK_ASSERT
 #define mb_check_buddy(e4b) __mb_check_buddy(e4b,      \