[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5edukhcwwr6foo67isfum3az6ds6tcmgrifgthwtivho6ffjmw@qrxmadbaib3l>
Date: Thu, 11 Dec 2025 10:23:13 +0100
From: Jan Kara <jack@...e.cz>
To: Matthew Wilcox <willy@...radead.org>
Cc: Deepakkumar Karn <dkarn@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>, David Hildenbrand <david@...nel.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Liam.Howlett@...cle.com, Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...nel.org>, Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>, Jan Kara <jack@...e.cz>, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pagemap: Add alert to mapping_set_release_always() for
mapping with no release_folio
On Wed 10-12-25 21:36:43, Matthew Wilcox wrote:
> On Thu, Dec 11, 2025 at 01:31:04AM +0530, Deepakkumar Karn wrote:
> > static inline void mapping_set_release_always(struct address_space *mapping)
> > {
> > + /* Alert while setting the flag with no release_folio callback */
>
> The comment is superfluous.
Agreed.
> > + VM_WARN_ONCE(!mapping->a_ops->release_folio,
> > + "Setting AS_RELEASE_ALWAYS with no release_folio");
>
> But you haven't said why we need to do this. Surely the NULL pointer
> splat is enough to tell you that you did something stupid?
Well, but this will tell it much earlier and it will directly point to the
place were you've done the mistake (instead of having to figure out why
drop_buffers() is crashing on you). So I think this assert makes sense to
ease debugging and as kind of self-reminding documentation :).
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists