diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-07-21 15:43:33 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 14:19:08 +0300 |
commit | 21dda654d4808833668b380e5f0b9befff8640ae (patch) | |
tree | d92788c1ef422b49479678dc38177a8d36ee2e6a /fs/btrfs/extent_io.c | |
parent | e83502ca5f1e1f03fb1393008ec22d17e7dc9882 (diff) | |
download | linux-21dda654d4808833668b380e5f0b9befff8640ae.tar.xz |
btrfs: fix argument type of btrfs_bio_clone_partial()
The offset and can never be negative use unsigned int instead of int
type for them.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 378ae860b3f3..3abb9365fbe9 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3161,11 +3161,13 @@ struct bio *btrfs_io_bio_alloc(unsigned int nr_iovecs) return bio; } -struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size) +struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size) { struct bio *bio; struct btrfs_io_bio *btrfs_bio; + ASSERT(offset <= UINT_MAX && size <= UINT_MAX); + /* this will never fail when it's backed by a bioset */ bio = bio_clone_fast(orig, GFP_NOFS, &btrfs_bioset); ASSERT(bio); |