diff options
| author | David Sterba <[email protected]> | 2025-06-27 11:01:17 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-07-21 21:58:05 +0000 |
| commit | ab5fcbb1adc8e44ed027b0a73f484fbc8d528b94 (patch) | |
| tree | 486b149c31db8b8965f3498602a74a9cef2d399c /fs/btrfs/extent_io.c | |
| parent | btrfs: replace nested usage of min & max with clamp in btrfs_compress_set_lev... (diff) | |
| download | kernel-ab5fcbb1adc8e44ed027b0a73f484fbc8d528b94.tar.gz kernel-ab5fcbb1adc8e44ed027b0a73f484fbc8d528b94.zip | |
btrfs: use pgoff_t for page index variables
Any conversion of offsets in the logical or the physical mapping space
of the pages is done by a shift and the target type should be pgoff_t
(type of struct page::index). Fix the locations where it's still
unsigned long.
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/extent_io.c')
| -rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 7c171e236fe9..d277a13d7bb5 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1662,7 +1662,7 @@ static int extent_writepage(struct folio *folio, struct btrfs_bio_ctrl *bio_ctrl int ret; size_t pg_offset; loff_t i_size = i_size_read(&inode->vfs_inode); - unsigned long end_index = i_size >> PAGE_SHIFT; + const pgoff_t end_index = i_size >> PAGE_SHIFT; const unsigned int blocks_per_folio = btrfs_blocks_per_folio(fs_info, folio); trace_extent_writepage(folio, &inode->vfs_inode, bio_ctrl->wbc); @@ -3146,7 +3146,7 @@ static int attach_eb_folio_to_filemap(struct extent_buffer *eb, int i, struct btrfs_fs_info *fs_info = eb->fs_info; struct address_space *mapping = fs_info->btree_inode->i_mapping; - const unsigned long index = eb->start >> PAGE_SHIFT; + const pgoff_t index = eb->start >> PAGE_SHIFT; struct folio *existing_folio; int ret; |
