]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
block: Use a folio in blkdev_write_end()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 10 Jul 2024 17:43:36 +0000 (13:43 -0400)
committerChristian Brauner <brauner@kernel.org>
Wed, 7 Aug 2024 09:31:58 +0000 (11:31 +0200)
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>
block/fops.c

index 9825c1713a49a98a9e9e6ff705b96c7fc10d038d..da44fedb23e51ed418cc5d26b4927a15f93063eb 100644 (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;
 }