diff options
author | David Sterba <dsterba@suse.com> | 2025-06-27 13:01:17 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-07-21 23:58:05 +0200 |
commit | ab5fcbb1adc8e44ed027b0a73f484fbc8d528b94 (patch) | |
tree | 486b149c31db8b8965f3498602a74a9cef2d399c /fs/btrfs/file.c | |
parent | afd1dacbd0964c7d36a9057c39c168fe7fbb5196 (diff) |
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 <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 247676f34f2e..05b046c6806f 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -856,7 +856,7 @@ static noinline int prepare_one_folio(struct inode *inode, struct folio **folio_ loff_t pos, size_t write_bytes, bool nowait) { - unsigned long index = pos >> PAGE_SHIFT; + const pgoff_t index = pos >> PAGE_SHIFT; gfp_t mask = get_prepare_gfp_flags(inode, nowait); fgf_t fgp_flags = (nowait ? FGP_WRITEBEGIN | FGP_NOWAIT : FGP_WRITEBEGIN) | fgf_set_order(write_bytes); |