From: Lukas Czerner <lczerner@redhat.com>
To: Ameer Hamza <amhamza.mgc@gmail.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: handle unsuccessful sbi allocation
Date: Tue, 25 Jan 2022 14:36:07 +0100 [thread overview]
Message-ID: <20220125133607.hioap2ggmiodmgr5@work> (raw)
In-Reply-To: <20220125130604.26473-1-amhamza.mgc@gmail.com>
We already have a patch to fix the problem on this list
https://lore.kernel.org/linux-ext4/20220119130209.40112-1-lczerner@redhat.com/T/#u
-Lukas
On Tue, Jan 25, 2022 at 06:06:04PM +0500, Ameer Hamza wrote:
> Move to common fail path in case of unsuccessful sbi allocation
>
> Addresses-Coverity: 1497833 ("Unused value")
>
> Signed-off-by: Ameer Hamza <amhamza.mgc@gmail.com>
> ---
> fs/ext4/super.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 57914acc5402..0dccf1ed931b 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -5540,8 +5540,10 @@ static int ext4_fill_super(struct super_block *sb, struct fs_context *fc)
> int ret;
>
> sbi = ext4_alloc_sbi(sb);
> - if (!sbi)
> + if (!sbi) {
> ret = -ENOMEM;
> + goto free_sbi;
> + }
>
> fc->s_fs_info = sbi;
>
> --
> 2.25.1
>
prev parent reply other threads:[~2022-01-25 13:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 13:06 [PATCH] ext4: handle unsuccessful sbi allocation Ameer Hamza
2022-01-25 13:36 ` Lukas Czerner [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=20220125133607.hioap2ggmiodmgr5@work \
--to=lczerner@redhat.com \
--cc=adilger.kernel@dilger.ca \
--cc=amhamza.mgc@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox