mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Maiolino <cem@kernel.org>
To: Wilfred Mallawa <wilfred.opensource@gmail.com>
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Wilfred Mallawa <wilfred.mallawa@wdc.com>
Subject: Re: [PATCH] xfs: fix unwind handling during xfs_mount_sysfs_init()
Date: Tue, 27 Oct 2026 16:50:43 +0100	[thread overview]
Message-ID: <auDFY4Lkxs76I_F5@cronus.toxiclabs.cc> (raw)
In-Reply-To: <20261026053454.987673-2-wilfred.opensource@gmail.com>

On Mon, Oct 26, 2026 at 03:34:55PM +1000, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> 
> The goto for failing to setup /error/metadata jumps to the wrong place
> in xfs_mount_sysfs_init(). Fix it.
> 
> Fixes: a9a7b9e8686d ("xfs: add support for lazy direct read bounce buffering")
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
> ---
>  fs/xfs/xfs_sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index e77917ac179d..4a6a8c92c3a1 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -906,7 +906,7 @@ xfs_mount_sysfs_init(
>  				"metadata", &mp->m_error_meta_kobj,
>  				xfs_error_meta_init);
>  	if (error)
> -		goto out_remove_csum_dir;
> +		goto out_remove_error_dir;

Hmm. I think this is wrong. Don't we need to remove the fail_at_unmount
file *before* removing the kobject?

So, we'd need to actually call sysfs_remove_file() before actually
deleting the m_error_kobj.

I am honestly not sure if kobject_del would clean up any attributes
added there, but I think that's the right thing to do here?!

Cheers.

>  
>  	return 0;
>  
> -- 
> 2.56.0
> 
> 

  parent reply	other threads:[~2026-10-27 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  5:34 Wilfred Mallawa
2026-10-27 15:43 ` Christoph Hellwig
2026-10-27 15:50 ` Carlos Maiolino [this message]
2026-10-27 22:39   ` Wilfred Mallawa

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=auDFY4Lkxs76I_F5@cronus.toxiclabs.cc \
    --to=cem@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=wilfred.mallawa@wdc.com \
    --cc=wilfred.opensource@gmail.com \
    /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

all inboxes | Powered by JetHome®