On Thu, Jun 19, 2025 at 03:50:01AM +0100, Matthew Wilcox wrote: > On Fri, Jun 13, 2025 at 08:07:00PM +0100, Matthew Wilcox (Oracle) wrote: > > @@ -201,17 +200,16 @@ static int test_find_delalloc(u32 sectorsize, u32 nodesize) > > * |--- search ---| > > */ > > test_start = SZ_64M; > > - locked_page = find_lock_page(inode->i_mapping, > > + locked_folio = filemap_lock_folio(inode->i_mapping, > > test_start >> PAGE_SHIFT); > > - if (!locked_page) { > > - test_err("couldn't find the locked page"); > > + if (!locked_folio) { > > + test_err("couldn't find the locked folio"); > > goto out_bits; > > } > > btrfs_set_extent_bit(tmp, sectorsize, max_bytes - 1, EXTENT_DELALLOC, NULL); > > start = test_start; > > end = start + PAGE_SIZE - 1; > > - found = find_lock_delalloc_range(inode, page_folio(locked_page), &start, > > - &end); > > + found = find_lock_delalloc_range(inode, locked_folio, &start, &end); > > if (!found) { > > test_err("couldn't find delalloc in our range"); > > goto out_bits; > > Hm. How much do you test the failure paths here? It seems to me that > the 'locked_folio' is still locked at this point ... I think we don't paid too much attention to the failure paths of tests, it means one has to go to check the new code first. If the tests pass then they will clean up everything, in case of error it's usually followed by reboot.