]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mount: remove redundant panic() in mnt_init()
authorHamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Mon, 20 Jul 2026 11:23:31 +0000 (07:23 -0400)
committerChristian Brauner <brauner@kernel.org>
Wed, 22 Jul 2026 15:57:45 +0000 (17:57 +0200)
Since at least as far back as commit 0818bf27c05b ("resizable
namespace.c hashes"), we call alloc_large_system_hash() in
mnt_init() which already panics if the table is NULL.

Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Link: https://patch.msgid.link/20260720112331.1096530-1-hamzamahfooz@linux.microsoft.com
Reviewed-by: Jori Koolstra <jkoolstra@xs4all.nl>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/namespace.c

index 52ee1e9f4f93ff30d39c8fbf8ffee48833c06dc3..4fcd4eb71c5a0ec8f5f75ef132f1aca44b2fd41f 100644 (file)
@@ -6266,9 +6266,6 @@ void __init mnt_init(void)
                                HASH_ZERO,
                                &mp_hash_shift, &mp_hash_mask, 0, 0);
 
-       if (!mount_hashtable || !mountpoint_hashtable)
-               panic("Failed to allocate mount hash table\n");
-
        kernfs_init();
 
        err = sysfs_init();