[PATCH] dm: dm-table warning fix
Changes
2 files changed · +2 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/md/dm-table.c | modified | +1 | −1 | View file |
| include/linux/device-mapper.h | modified | +1 | −1 | View file |
drivers/md/dm-table.c
View filediff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index a6f2dc6..9b1e2f5 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -508,7 +508,7 @@ int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
if (q->merge_bvec_fn)
rs->max_sectors =
min_not_zero(rs->max_sectors,
- (unsigned short)(PAGE_SIZE >> 9));
+ (unsigned int) (PAGE_SIZE >> 9));
rs->max_phys_segments =
min_not_zero(rs->max_phys_segments,
include/linux/device-mapper.h
View filediff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 83c7d20..51e0e95 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -91,7 +91,7 @@ struct target_type {
};
struct io_restrictions {
- unsigned short max_sectors;
+ unsigned int max_sectors;
unsigned short max_phys_segments;
unsigned short max_hw_segments;
unsigned short hardsect_size;