Remove open-coded use_udev().

Manage_runstop has an open-coded version of use_udev() which is no
longer correct.  So make it use use_udev() explicitly.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-05-13 13:03:25 +10:00
parent 743eaf8b70
commit 8adabef587
1 changed files with 1 additions and 4 deletions

View File

@ -209,7 +209,6 @@ int Manage_runstop(char *devname, int fd, int runstop,
pr_err("started %s\n", devname);
} else if (runstop < 0){
struct map_ent *map = NULL;
struct stat stb;
struct mdinfo *mdi;
char devnm[32];
char container[32];
@ -359,9 +358,7 @@ int Manage_runstop(char *devname, int fd, int runstop,
if (mdi)
sysfs_uevent(mdi, "change");
if (devnm[0] &&
(stat("/dev/.udev", &stb) != 0 ||
check_env("MDADM_NO_UDEV"))) {
if (devnm[0] && use_udev()) {
struct map_ent *mp = map_by_devnm(&map, devnm);
remove_devices(devnm, mp ? mp->path : NULL);
}