Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Benjamin Marzinski <bmarzins@redhat.com> |
| 3 | Date: Fri, 8 Jun 2018 17:23:07 -0500 |
| 4 | Subject: [PATCH] multipath: fix setting conf->version |
| 5 | |
| 6 | Commit d3b71498 stopped multipath from setting conf->version. Instead, |
| 7 | it was always being set to 0.0.0. Multipathd was still setting this |
| 8 | correctly. |
| 9 | |
| 10 | Fixes: d3b71498 "multipath: fix rcu thread cancellation hang" |
| 11 | Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> |
| 12 | --- |
| 13 | libmultipath/devmapper.c | 6 +++--- |
| 14 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c |
| 17 | index f2befad..8136d15 100644 |
| 18 | --- a/libmultipath/devmapper.c |
| 19 | +++ b/libmultipath/devmapper.c |
| 20 | @@ -245,13 +245,13 @@ void libmp_dm_init(void) |
| 21 | int verbosity; |
| 22 | unsigned int version[3]; |
| 23 | |
| 24 | + if (dm_prereq(version)) |
| 25 | + exit(1); |
| 26 | conf = get_multipath_config(); |
| 27 | verbosity = conf->verbosity; |
| 28 | - memcpy(version, conf->version, sizeof(version)); |
| 29 | + memcpy(conf->version, version, sizeof(version)); |
| 30 | put_multipath_config(conf); |
| 31 | dm_init(verbosity); |
| 32 | - if (dm_prereq(version)) |
| 33 | - exit(1); |
| 34 | dm_udev_set_sync_support(libmp_dm_udev_sync); |
| 35 | } |
| 36 | |
| 37 | -- |
| 38 | 2.7.4 |
| 39 | |