linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* of btrfs_free_squota_rsv
@ 2024-10-03 13:45 Dr. David Alan Gilbert
  2024-10-03 18:38 ` Boris Burkov
  0 siblings, 1 reply; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2024-10-03 13:45 UTC (permalink / raw)
  To: boris; +Cc: linux-btrfs

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?

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   |_______/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: of btrfs_free_squota_rsv
  2024-10-03 13:45 of btrfs_free_squota_rsv Dr. David Alan Gilbert
@ 2024-10-03 18:38 ` Boris Burkov
  2024-10-03 20:34   ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Burkov @ 2024-10-03 18:38 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: linux-btrfs

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   |_______/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: of btrfs_free_squota_rsv
  2024-10-03 18:38 ` Boris Burkov
@ 2024-10-03 20:34   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2024-10-03 20:34 UTC (permalink / raw)
  To: Boris Burkov; +Cc: linux-btrfs

* Boris Burkov (boris@bur.io) wrote:
> 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!

OK then, please see my just posted message 20241003203319.241687-1-linux@treblig.org
(from my linux@treblig.org alias)

Thanks again,

Dave

> 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   |_______/
-- 
 -----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   |_______/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-03 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 13:45 of btrfs_free_squota_rsv Dr. David Alan Gilbert
2024-10-03 18:38 ` Boris Burkov
2024-10-03 20:34   ` Dr. David Alan Gilbert

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).