mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
btrfs: fix wrong sizeof in btrfs_do_encoded_write()
btrfs_do_encoded_write() was converted to use folios in 400b172b8c,
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>
This commit is contained in:
parent
4f285a7752
commit
b1c5f6eda2
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user