[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250123213253.GM5777@twin.jikos.cz>
Date: Thu, 23 Jan 2025 22:32:53 +0100
From: David Sterba <dsterba@...e.cz>
To: Daniel Vacek <neelx@...e.com>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] btrfs: keep `priv` struct on stack for sync reads in
`btrfs_encoded_read_regular_fill_pages()`
On Wed, Jan 15, 2025 at 04:24:58PM +0100, Daniel Vacek wrote:
> Only allocate the `priv` struct from slab for asynchronous mode.
>
> There's no need to allocate an object from slab in the synchronous mode. In
> such a case stack can be happily used as it used to be before 68d3b27e05c7
> ("btrfs: move priv off stack in btrfs_encoded_read_regular_fill_pages()")
> which was a preparation for the async mode.
>
> While at it, fix the comment to reflect the atomic => refcount change in
> d29662695ed7 ("btrfs: fix use-after-free waiting for encoded read endios").
>
> Signed-off-by: Daniel Vacek <neelx@...e.com>
> ---
> v2 reduces the patch only to functional changes as suggested by Johannes
> and Dave.
Added to for-next, thanks.
Powered by blists - more mailing lists