public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Anand Jain <anand.jain@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] btrfs: fix the btrfs_get_global_root return value
Date: Tue, 23 May 2023 13:48:27 +0200	[thread overview]
Message-ID: <20230523114827.GA29348@lst.de> (raw)
In-Reply-To: <4031cd58-dd4c-a0cb-79d4-38c7f03ceaf3@oracle.com>

On Tue, May 23, 2023 at 07:37:23PM +0800, Anand Jain wrote:
> On 23/05/2023 16:40, Christoph Hellwig wrote:
>> btrfs_grab_root returns either the root or NULL, and the callers of
>> btrfs_get_global_root expect it to return the same.  But all the more
>> recently added roots instead return an ERR_PTR, so fix this.
>>
>
> Fix looks good. However, I'm curious about the Fixes commit
> you're referring to as the one this fix addresses...
>
>> Fixes: bcef60f24903 ("Btrfs: quota tree support and startup")
>
> btrfs_read_fs_root_no_name() return value used at that commit.

Indeed. open_ctree also used to check IS_ERR after the NULL check.
So while this commit was really odd in that it added the first ERR_PTR
return to the otherwise NULL as failure btrfs_read_fs_root_no_name,
that was actually handled.  Looks like the first fixes would be for
whoever dropped that check, but finding code removals in git-blame
tends to be a bit hard.  I'll see if I can track down the culprit.

Otherwise I'm fine with just dropping the extra Fixes tags.

  reply	other threads:[~2023-05-23 11:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23  8:40 [PATCH 1/3] btrfs: fix the btrfs_get_global_root return value Christoph Hellwig
2023-05-23  8:40 ` [PATCH 2/3] btrfs: convert btrfs_get_global_root to use a switch statement Christoph Hellwig
2023-05-23 10:19   ` Johannes Thumshirn
2023-05-23  8:40 ` [PATCH 3/3] btrfs: remove a pointless NULL check in btrfs_lookup_fs_root Christoph Hellwig
2023-05-23 10:20   ` Johannes Thumshirn
2023-05-23 10:11 ` [PATCH 1/3] btrfs: fix the btrfs_get_global_root return value Johannes Thumshirn
2023-05-23 11:37 ` Anand Jain
2023-05-23 11:48   ` Christoph Hellwig [this message]
2023-05-25 23:12     ` David Sterba
2023-05-25 23:15 ` David Sterba

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=20230523114827.GA29348@lst.de \
    --to=hch@lst.de \
    --cc=anand.jain@oracle.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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