Matthew Wilcox (Oracle) 6bf74cddcf filemap: Don't release a locked folio
We must hold a reference over the call to filemap_release_folio(),
otherwise the page cache will put the last reference to the folio
before we unlock it, leading to splats like this:

 BUG: Bad page state in process u8:5  pfn:1ab1f4
 page:ffffea0006ac7d00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x28b1de pfn:0x1ab1f4
 flags: 0x17ff80000040001(locked|reclaim|node=0|zone=2|lastcpupid=0xfff)
 raw: 017ff80000040001 dead000000000100 dead000000000122 0000000000000000
 raw: 000000000028b1de 0000000000000000 00000000ffffffff 0000000000000000
 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set

It's an error path, so it doesn't see much testing.

Reported-by: Darrick J. Wong <djwong@kernel.org>
Fixes: a42634a6c07d ("readahead: Use a folio in read_pages()")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-06-09 16:24:25 -04:00
..
2022-05-19 14:08:55 -07:00
2021-05-05 11:27:24 -07:00
2022-03-24 19:06:45 -07:00
2022-05-13 07:20:09 -07:00
2022-02-14 19:51:47 +01:00
2022-05-25 10:47:48 -07:00
2022-03-23 18:03:08 -07:00
2022-05-19 14:08:53 -07:00
2022-05-13 07:20:09 -07:00
2022-05-28 11:27:17 -07:00
2022-03-22 17:03:12 -07:00
2022-05-26 16:57:20 -07:00
2021-05-07 00:26:35 -07:00
2022-05-09 23:12:53 -04:00
2022-05-25 10:24:04 -07:00
2022-05-25 10:24:04 -07:00
2022-03-22 18:26:56 -07:00
2022-05-28 11:27:17 -07:00
2022-06-04 14:04:27 -07:00
2022-01-15 16:30:31 +02:00
2022-05-19 14:08:53 -07:00