All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jori Koolstra <jkoolstra@xs4all.nl>
To: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Cc: linux-fsdevel@vger.kernel.org,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mount: remove redundant panic() in mnt_init()
Date: Mon, 20 Jul 2026 13:51:06 +0200	[thread overview]
Message-ID: <al4K4VVOtKuXxwDk@daedalus> (raw)
In-Reply-To: <20260720112331.1096530-1-hamzamahfooz@linux.microsoft.com>

On Mon, Jul 20, 2026 at 07:23:31AM -0400, Hamza Mahfooz wrote:
> 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>
> ---
>  fs/namespace.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/namespace.c b/fs/namespace.c
> index fe919abd2f01..43de01ce023e 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -6248,9 +6248,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();
> -- 
> 2.55.0
> 

There isn't a reasonable way to return from this, and I see the other
uses of alloc_large_system_hash() also don't check for NULL, so this
is an OK clean-up.

Reviewed-by: Jori Koolstra <jkoolstra@xs4all.nl>

      reply	other threads:[~2026-07-20 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 11:23 [PATCH] mount: remove redundant panic() in mnt_init() Hamza Mahfooz
2026-07-20 11:51 ` Jori Koolstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=al4K4VVOtKuXxwDk@daedalus \
    --to=jkoolstra@xs4all.nl \
    --cc=brauner@kernel.org \
    --cc=hamzamahfooz@linux.microsoft.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.