aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-07-26 15:25:45 -0400
committerDavid Sterba <dsterba@suse.com>2024-09-10 16:51:15 +0200
commit9f5db28074ade4edf8cf081927134f7eebd912f3 (patch)
tree27e36e088f83c5cbefcf00f63a61026304ee813c /fs/btrfs/inode.c
parent2cdc1fbb1b1558b5ca1fe81d4fee723f09940bba (diff)
btrfs: convert cow_file_range_inline() to take a folio
Now that we want the folio in this function, convert it to take a folio directly and use that. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index bcbaf2e65e5a..fd3232472d32 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -715,7 +715,7 @@ out:
}
static noinline int cow_file_range_inline(struct btrfs_inode *inode,
- struct page *locked_page,
+ struct folio *locked_folio,
u64 offset, u64 end,
size_t compressed_size,
int compress_type,
@@ -741,10 +741,9 @@ static noinline int cow_file_range_inline(struct btrfs_inode *inode,
}
if (ret == 0)
- locked_page = NULL;
+ locked_folio = NULL;
- extent_clear_unlock_delalloc(inode, offset, end,
- page_folio(locked_page), &cached,
+ extent_clear_unlock_delalloc(inode, offset, end, locked_folio, &cached,
clear_flags, PAGE_UNLOCK |
PAGE_START_WRITEBACK | PAGE_END_WRITEBACK);
return ret;
@@ -1365,8 +1364,9 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
if (!no_inline) {
/* lets try to make an inline extent */
- ret = cow_file_range_inline(inode, locked_page, start, end, 0,
- BTRFS_COMPRESS_NONE, NULL, false);
+ ret = cow_file_range_inline(inode, page_folio(locked_page),
+ start, end, 0, BTRFS_COMPRESS_NONE,
+ NULL, false);
if (ret <= 0) {
/*
* We succeeded, return 1 so the caller knows we're done