1
0
Fork 0

Adding upstream version 4.2+20230901.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:31:42 +01:00
parent 14fbe53fb1
commit f48db6685a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
15 changed files with 418 additions and 196 deletions

View file

@ -222,6 +222,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
if (verbose >= 0)
pr_err("Cannot get exclusive access to %s:Perhaps a running process, mounted filesystem or active volume group?\n",
devname);
sysfs_free(mdi);
return 1;
}
/* If this is an mdmon managed array, just write 'inactive'
@ -801,8 +802,14 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
rdev, update, devname,
verbose, array);
dev_st->ss->free_super(dev_st);
if (rv)
if (rv) {
free(dev_st);
return rv;
}
}
if (dev_st) {
dev_st->ss->free_super(dev_st);
free(dev_st);
}
}
if (dv->disposition == 'M') {
@ -1362,7 +1369,7 @@ int Manage_subdevs(char *devname, int fd,
unsigned long long array_size;
struct mddev_dev *dv;
int tfd = -1;
struct supertype *tst;
struct supertype *tst = NULL;
char *subarray = NULL;
int sysfd = -1;
int count = 0; /* number of actions taken */
@ -1699,6 +1706,7 @@ int Manage_subdevs(char *devname, int fd,
break;
}
}
free(tst);
if (frozen > 0)
sysfs_set_str(&info, NULL, "sync_action","idle");
if (test && count == 0)
@ -1706,6 +1714,7 @@ int Manage_subdevs(char *devname, int fd,
return 0;
abort:
free(tst);
if (frozen > 0)
sysfs_set_str(&info, NULL, "sync_action","idle");
return !test && busy ? 2 : 1;