From: Matthew Wilcox (Oracle) Date: Wed, 10 Jul 2024 17:43:36 +0000 (-0400) Subject: block: Use a folio in blkdev_write_end() X-Git-Tag: v6.12-rc1~214^2~2^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1262249d038a3823531dd220e5eced93bccf8d38;p=thirdparty%2Fkernel%2Flinux.git block: Use a folio in blkdev_write_end() Replaces two hidden calls to compound_head() with one explicit one. Reviewed-by: Josef Bacik Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Christian Brauner --- diff --git a/block/fops.c b/block/fops.c index 9825c1713a49a..da44fedb23e51 100644 --- a/block/fops.c +++ b/block/fops.c @@ -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; }