Tomohiro Kusumi
aad9ae4550
dm switch: simplify conditional in alloc_region_table()
...
The variable sctx->nr_regions has type unsigned long and the variable
nr_regions has type sector_t.
Thus the variables may be different when overflow happens.
Changed the conditional to "if (nr_regions >= ULONG_MAX)".
Also move the assignment of nr_regions after sector_div()
and the sanity check which looks more sane.
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2015-10-31 19:06:06 -04:00
..
2015-08-13 12:31:40 -06:00
2015-10-31 19:06:02 -04:00
2015-10-02 17:24:13 +10:00
2015-07-29 08:55:15 -06:00
2015-05-29 14:19:06 -04:00
2015-10-31 19:06:01 -04:00
2015-10-31 19:06:02 -04:00
2015-06-11 17:13:00 -04:00
2015-10-31 19:06:01 -04:00
2015-06-11 17:13:01 -04:00
2015-10-31 19:06:01 -04:00
2015-10-31 19:06:01 -04:00
2015-06-11 17:13:01 -04:00
2015-10-31 19:06:00 -04:00
2015-10-31 19:06:00 -04:00
2015-10-31 19:06:05 -04:00
2015-10-31 19:06:02 -04:00
2015-10-31 19:06:01 -04:00
2015-10-31 19:05:59 -04:00
2015-10-31 19:06:00 -04:00
2015-08-05 10:35:49 -07:00
2015-10-31 19:06:03 -04:00
2015-10-31 19:06:00 -04:00
2015-10-31 19:05:59 -04:00
2015-10-31 19:05:59 -04:00
2015-09-02 16:35:26 -07:00
2015-08-13 12:31:57 -06:00
2015-10-31 19:06:01 -04:00
2015-10-31 19:06:01 -04:00
2015-09-02 16:35:26 -07:00
2015-08-18 17:20:03 -04:00
2015-06-17 12:40:40 -04:00
2015-09-02 16:35:26 -07:00
2015-10-31 19:06:06 -04:00
2015-08-19 14:26:02 -07:00
2015-10-31 19:06:02 -04:00
2015-06-11 17:13:04 -04:00
2015-09-13 21:32:10 -04:00
2015-10-31 19:05:59 -04:00
2015-07-29 08:55:15 -06:00
2015-10-31 19:06:02 -04:00
2015-08-13 12:31:57 -06:00
2015-07-29 08:55:15 -06:00
2015-09-11 18:15:18 -07:00
2015-08-13 12:31:57 -06:00
2015-06-11 17:12:59 -04:00
2015-08-31 19:43:17 +02:00
2015-07-24 13:37:59 +10:00
2015-10-02 17:23:44 +10:00
2015-08-13 12:31:57 -06:00
2015-10-02 17:23:44 +10:00
2015-10-02 17:23:44 +10:00
2015-08-13 12:31:57 -06:00
2015-10-02 17:23:44 +10:00
2015-08-31 19:43:23 +02:00
2015-10-02 17:23:44 +10:00
2015-08-31 19:43:59 +02:00
2015-10-02 17:23:44 +10:00
2015-08-31 19:43:45 +02:00