block: Use a folio in blkdev_write_end()

Replaces two hidden calls to compound_head() with one explicit one.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2024-07-10 13:43:36 -04:00 committed by Christian Brauner
parent cc67bcb2c3
commit 1262249d03
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -460,11 +460,12 @@ static int blkdev_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied, struct page *page,
void *fsdata)
{
struct folio *folio = page_folio(page);
int ret;
ret = block_write_end(file, mapping, pos, len, copied, page, fsdata);
unlock_page(page);
put_page(page);
folio_unlock(folio);
folio_put(folio);
return ret;
}