summaryrefslogtreecommitdiff
path: root/block/fops.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-10 13:43:36 -0400
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:31:58 +0200
commit1262249d038a3823531dd220e5eced93bccf8d38 (patch)
tree3d9a9be59aa587fe8639619da985fec026904258 /block/fops.c
parentcc67bcb2c3709e12f1a72d5a884942309c89c2ee (diff)
downloadlwn-1262249d038a3823531dd220e5eced93bccf8d38.tar.gz
lwn-1262249d038a3823531dd220e5eced93bccf8d38.zip
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>
Diffstat (limited to 'block/fops.c')
-rw-r--r--block/fops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/fops.c b/block/fops.c
index 9825c1713a49..da44fedb23e5 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;
}