summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harmstone <maharmstone@fb.com>2024-10-15 12:37:29 +0100
committerDavid Sterba <dsterba@suse.com>2024-11-11 14:34:18 +0100
commitb1c5f6eda2d024c187d4d47f0310bc5a1cc8b1d3 (patch)
treec421ef234ed2dbdcbb2e44fcf392b076d40c3361
parent4f285a7752071a925f3b3062b24220d01b8c0f8a (diff)
btrfs: fix wrong sizeof in btrfs_do_encoded_write()
btrfs_do_encoded_write() was converted to use folios in 400b172b8cdc, but we're still allocating based on sizeof(struct page *) rather than sizeof(struct folio *). There's no functional change. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Mark Harmstone <maharmstone@fb.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 6abcfdfe7b30..42e87a0f0946 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9438,7 +9438,7 @@ ssize_t btrfs_do_encoded_write(struct kiocb *iocb, struct iov_iter *from,
*/
disk_num_bytes = ALIGN(orig_count, fs_info->sectorsize);
nr_folios = DIV_ROUND_UP(disk_num_bytes, PAGE_SIZE);
- folios = kvcalloc(nr_folios, sizeof(struct page *), GFP_KERNEL_ACCOUNT);
+ folios = kvcalloc(nr_folios, sizeof(struct folio *), GFP_KERNEL_ACCOUNT);
if (!folios)
return -ENOMEM;
for (i = 0; i < nr_folios; i++) {