Re: [PATCH 06/46] mm/filemap: read mapping->a_ops->free_folio under i_lock
From: David Hildenbrand (Arm)
Date: Fri Oct 30 2026 - 17:46:13 EST
On 10/27/26 16:47, Pedro Falcato wrote:
> On Tue, Oct 27, 2026 at 12:17:26AM +0100, David Hildenbrand (Arm) wrote:
>> From: Josef Bacik <josef@xxxxxxxxxxxxxx>
>>
>> memory_failure() -> ... -> filemap_remove_folio() can read mapping->a_ops
>> after the inode has been freed. Once the folio is deleted from the
>> pagecache it no longer pins the mapping, so after i_lock is dropped
>> e.g., a concurrent final iput() can evict and free the inode before
>> filemap_free_folio() looks up mapping->a_ops->free_folio.
>
I agree with what Willy just replied.
But his reply made me realize that I missed your reply and just wanted to say
that it was not intentional.
... after I already missed another one on patch #3 ... guess my fingers were
typing "r" a bit too fast in a row. :(
--
Cheers,
David