Chaitanya Kulkarni e83502ca5f block: fix argument type of bio_trim()
The function bio_trim has offset and size arguments that are declared
as int.

The callers of this function use sector_t type when passing the offset
and size, e.g. drivers/md/raid1.c:narrow_write_error() and
drivers/md/raid1.c:narrow_write_error().

Change offset and size arguments to sector_t type for bio_trim(). Also,
add WARN_ON_ONCE() to catch their overflow.

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>
2021-08-23 13:19:08 +02:00
..
2021-08-07 10:26:21 -07:00
2021-08-23 13:19:08 +02:00
2021-08-17 20:17:34 -06:00
2021-06-17 15:51:20 +02:00
2021-06-29 07:41:08 -06:00
2020-03-17 20:55:21 +01:00
2021-08-17 20:17:34 -06:00
2021-05-09 13:25:14 -07:00
2021-08-17 20:17:34 -06:00
2021-07-09 12:05:33 -07:00
2021-07-09 12:05:33 -07:00
2021-07-27 19:35:47 -06:00
2021-07-09 12:05:33 -07:00
2020-01-06 20:59:04 -07:00