diff options
| author | Nathan Chancellor <natechancellor@gmail.com> | 2020-05-13 01:45:22 -0700 |
|---|---|---|
| committer | Mike Snitzer <snitzer@redhat.com> | 2020-05-15 10:29:39 -0400 |
| commit | 81a3a1453ec4e5da081e1395732801a600feb352 (patch) | |
| tree | 05c1100619015bd221bf02189e8cd59993390565 | |
| parent | fe38d250752a84f4c07278bca2d69252e701c8de (diff) | |
| download | linux-dm-81a3a1453ec4e5da081e1395732801a600feb352.tar.gz | |
dm zoned: Avoid 64-bit division error in dmz_fixup_devices
Notice: this object is not reachable from any branch.
When building arm32 allyesconfig:
ld.lld: error: undefined symbol: __aeabi_uldivmod
>>> referenced by dm-zoned-target.c
>>> md/dm-zoned-target.o:(dmz_ctr) in archive drivers/built-in.a
dmz_fixup_devices uses DIV_ROUND_UP with variables of type sector_t. As
such, it should be using DIV_ROUND_UP_SECTOR_T, which handles this
automatically.
Fixes: 70978208ec91 ("dm zoned: metadata version 2")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Notice: this object is not reachable from any branch.
| -rw-r--r-- | drivers/md/dm-zoned-target.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-zoned-target.c b/drivers/md/dm-zoned-target.c index a3d572da70ada..b586fc67d931d 100644 --- a/drivers/md/dm-zoned-target.c +++ b/drivers/md/dm-zoned-target.c @@ -803,8 +803,9 @@ static int dmz_fixup_devices(struct dm_target *ti) if (reg_dev) { reg_dev->zone_nr_sectors = zoned_dev->zone_nr_sectors; - reg_dev->nr_zones = DIV_ROUND_UP(reg_dev->capacity, - reg_dev->zone_nr_sectors); + reg_dev->nr_zones = + DIV_ROUND_UP_SECTOR_T(reg_dev->capacity, + reg_dev->zone_nr_sectors); zoned_dev->zone_offset = reg_dev->nr_zones; } return 0; |
