linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-mm@kvack.org, kernel-janitors@vger.kernel.org,
	Muchun Song <muchun.song@linux.dev>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] hugetlbfs: Improve exception handling in hugetlbfs_fill_super()
Date: Fri, 29 Dec 2023 14:52:01 +0000	[thread overview]
Message-ID: <ZY7dEbRJb1dHkQPd@casper.infradead.org> (raw)
In-Reply-To: <b109b7dc-3972-4b2e-ae4c-89bf8eecf8f2@web.de>

On Fri, Dec 29, 2023 at 12:40:12PM +0100, Markus Elfring wrote:
> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
> index 24401a5046dd..5687ec574dc4 100644
> --- a/fs/hugetlbfs/inode.c
> +++ b/fs/hugetlbfs/inode.c
> @@ -1483,7 +1483,7 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc)
>  						     ctx->max_hpages,
>  						     ctx->min_hpages);
>  		if (!sbinfo->spool)
> -			goto out_free;
> +			goto free_sbinfo;
>  	}
>  	sb->s_maxbytes = MAX_LFS_FILESIZE;
>  	sb->s_blocksize = huge_page_size(ctx->hstate);
> @@ -1499,10 +1499,12 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc)
>  	sb->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;
>  	sb->s_root = d_make_root(hugetlbfs_get_root(sb, ctx));
>  	if (!sb->s_root)
> -		goto out_free;
> +		goto free_spool;
>  	return 0;
> -out_free:
> +
> +free_spool:
>  	kfree(sbinfo->spool);
> +free_sbinfo:
>  	kfree(sbinfo);
>  	return -ENOMEM;
>  }

This is more complex.  NACK.


  reply	other threads:[~2023-12-29 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29 11:36 [PATCH 0/2] hugetlbfs: Adjustments for two function implementations Markus Elfring
2023-12-29 11:37 ` [PATCH 1/2] hugetlbfs: Improve a size determination in two functions Markus Elfring
2024-01-02  2:57   ` Muchun Song
2023-12-29 11:40 ` [PATCH 2/2] hugetlbfs: Improve exception handling in hugetlbfs_fill_super() Markus Elfring
2023-12-29 14:52   ` Matthew Wilcox [this message]
2023-12-30  6:45     ` Markus Elfring

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=ZY7dEbRJb1dHkQPd@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=Markus.Elfring@web.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    /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