From: Boris Burkov <boris@bur.io>
To: "Dr. David Alan Gilbert" <dave@treblig.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: of btrfs_free_squota_rsv
Date: Thu, 3 Oct 2024 11:38:02 -0700 [thread overview]
Message-ID: <20241003183802.GA414021@zen.localdomain> (raw)
In-Reply-To: <Zv6f_ALAoC_kFg9z@gallifrey>
On Thu, Oct 03, 2024 at 01:45:32PM +0000, Dr. David Alan Gilbert wrote:
> Hi Boris,
> One of my scripts noticed that 'btrfs_free_squota_rsv' is unused;
> it came from your commit:
>
> commit e85a0adacf170634878fffcbf34b725aff3f49ed
> Author: Boris Burkov <boris@bur.io>
> Date: Fri Dec 1 13:00:13 2023 -0800
>
> btrfs: ensure releasing squota reserve on head refs
>
> I was going to deadcode it, but then thought I'd better check since
> unused 'free's sometime turn out to be someone forgot to free something!
>
> Thoughts?
Hi Dave,
Thanks for catching it, and for the thoughtful message.
I believe that function is just pure sloppy duplication. The same
functionality is in introduced in the same patch in
fs/btrfs/extent-tree.c in `free_head_ref_squota_rsv`, which _is_ used
in the cleanup path.
So with that said, please deadcode away!
Boris
>
> Dave
> --
> -----Open up your eyes, open up your mind, open up your code -------
> / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> \ dave @ treblig.org | | In Hex /
> \ _________________________|_____ http://www.treblig.org |_______/
next prev parent reply other threads:[~2024-10-03 18:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 13:45 of btrfs_free_squota_rsv Dr. David Alan Gilbert
2024-10-03 18:38 ` Boris Burkov [this message]
2024-10-03 20:34 ` Dr. David Alan Gilbert
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=20241003183802.GA414021@zen.localdomain \
--to=boris@bur.io \
--cc=dave@treblig.org \
--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;
as well as URLs for NNTP newsgroup(s).