Nikos Tsironis
757d2b1dc4
dm clone metadata: Fix return type of dm_clone_nr_of_hydrated_regions()
...
commit 81d5553d12 upstream.
dm_clone_nr_of_hydrated_regions() returns the number of regions that
have been hydrated so far. In order to do so it employs bitmap_weight().
Until now, the return type of dm_clone_nr_of_hydrated_regions() was
unsigned long.
Because bitmap_weight() returns an int, in case BITS_PER_LONG == 64 and
the return value of bitmap_weight() is 2^31 (the maximum allowed number
of regions for a device), the result is sign extended from 32 bits to 64
bits and an incorrect value is displayed, in the status output of
dm-clone, as the number of hydrated regions.
Fix this by having dm_clone_nr_of_hydrated_regions() return an unsigned
int.
Fixes: 7431b7835f ("dm: add clone target")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com >
Signed-off-by: Mike Snitzer <snitzer@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-04-17 16:12:11 +02:00
..
2020-02-24 08:38:51 +01:00
2020-02-11 04:36:56 -08:00
2019-11-05 14:53:03 -05:00
2017-06-09 09:27:32 -06:00
2019-11-05 14:53:03 -05:00
2017-03-07 11:30:16 -05:00
2020-03-25 08:26:56 +01:00
2019-09-13 17:00:21 -04:00
2017-11-02 11:10:55 +01:00
2018-04-30 15:40:40 -04:00
2017-03-07 13:28:31 -05:00
2016-12-16 00:13:41 +02:00
2019-04-18 16:18:25 -04:00
2017-03-07 13:28:31 -05:00
2017-03-07 13:28:31 -05:00
2018-10-16 14:34:59 -04:00
2014-01-16 13:44:11 -05:00
2017-03-07 13:28:31 -05:00
2020-03-12 07:18:37 +01:00
2020-04-17 16:12:11 +02:00
2020-04-17 16:12:11 +02:00
2020-04-17 16:12:11 +02:00
2019-04-04 15:33:59 -04:00
2020-02-11 04:36:57 -08:00
2019-04-26 11:29:32 -04:00
2019-11-05 15:25:34 -05:00
2019-05-21 10:50:45 +02:00
2015-11-04 21:19:53 -08:00
2019-05-16 15:55:48 -07:00
2019-11-12 19:12:07 -07:00
2019-07-15 11:03:01 -03:00
2020-04-17 16:12:10 +02:00
2018-06-05 08:47:43 -06:00
2019-09-16 10:18:01 -04:00
2019-08-15 15:57:39 -04:00
2019-11-12 19:12:07 -07:00
2018-05-30 15:33:32 -06:00
2015-04-15 12:10:20 -04:00
2019-07-09 14:13:33 -04:00
2016-11-01 09:43:26 -06:00
2019-11-26 10:22:46 -05:00
2016-02-22 22:34:42 -05:00
2018-01-29 13:44:58 -05:00
2019-08-26 11:05:32 -04:00
2020-02-24 08:38:03 +01:00
2018-06-12 18:28:00 -07:00
2017-02-17 00:54:09 -05:00
2019-09-05 19:52:34 -06:00
2019-03-05 14:48:50 -05:00
2018-01-29 13:44:58 -05:00
2020-01-15 21:43:09 -07:00
2016-01-08 20:03:05 -05:00
2019-10-10 09:46:05 -04:00
2019-09-04 09:39:22 -04:00
2017-11-02 11:10:55 +01:00
2019-11-05 14:09:59 -05:00
2019-03-05 14:48:51 -05:00
2018-10-11 11:36:09 -04:00
2019-12-03 08:51:25 -07:00
2019-04-25 15:38:52 -04:00
2020-03-12 07:18:22 +01:00
2019-12-05 17:05:24 -05:00
2020-02-24 08:38:30 +01:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2018-12-18 09:02:26 -05:00
2020-04-17 16:12:10 +02:00
2019-05-30 11:26:32 -07:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2020-04-17 16:12:10 +02:00
2017-06-09 09:27:32 -06:00
2020-04-17 16:12:10 +02:00
2019-11-07 10:08:36 -05:00
2020-03-12 07:18:38 +01:00
2019-11-07 10:08:36 -05:00
2020-04-08 09:10:02 +02:00
2019-08-23 10:13:12 -04:00
2019-11-20 10:35:31 -05:00
2019-09-12 09:32:31 -04:00
2019-10-24 15:22:40 -07:00
2018-08-01 15:49:39 -07:00
2019-05-24 17:27:12 +02:00
2018-10-18 09:36:35 -07:00
2019-05-24 17:27:13 +02:00
2019-10-24 15:22:40 -07:00
2017-11-14 16:07:26 -08:00
2019-10-24 15:22:40 -07:00
2018-05-30 15:33:32 -06:00
2020-04-17 16:11:57 +02:00
2019-10-24 15:22:40 -07:00
2020-01-15 21:43:09 -07:00
2019-09-13 13:10:05 -07:00
2019-06-15 01:37:35 -06:00
2019-12-11 10:36:13 -08:00
2018-05-30 15:33:32 -06:00
2019-06-05 17:36:37 +02:00
2019-03-12 10:15:18 -07:00
2019-12-09 10:36:44 -08:00
2019-12-11 10:12:09 -08:00
2019-09-13 13:14:43 -07:00
2019-11-11 16:47:39 -08:00
2018-05-30 15:33:32 -06:00