mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
Merge tag 'md-7.0-20260202' of git://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-7.0/block
Pull MD fixes from Yu Kuai: "Bug Fixes: - Fix return value of mddev_trylock (Xiao Ni) - Fix memory leak in raid1_run() (Zilin Guan) Maintainers: - Add Li Nan as mdraid reviewer (Li Nan)" * tag 'md-7.0-20260202' of git://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux: MAINTAINERS: Add Li Nan as md/raid reviewer md: fix return value of mddev_trylock md/raid1: fix memory leak in raid1_run()
This commit is contained in:
@@ -24239,6 +24239,7 @@ F: include/linux/property.h
|
||||
SOFTWARE RAID (Multiple Disks) SUPPORT
|
||||
M: Song Liu <song@kernel.org>
|
||||
M: Yu Kuai <yukuai@fnnas.com>
|
||||
R: Li Nan <linan122@huawei.com>
|
||||
L: linux-raid@vger.kernel.org
|
||||
S: Supported
|
||||
Q: https://patchwork.kernel.org/project/linux-raid/list/
|
||||
|
||||
@@ -735,8 +735,8 @@ static inline int mddev_trylock(struct mddev *mddev)
|
||||
int ret;
|
||||
|
||||
ret = mutex_trylock(&mddev->reconfig_mutex);
|
||||
if (!ret && test_bit(MD_DELETED, &mddev->flags)) {
|
||||
ret = -ENODEV;
|
||||
if (ret && test_bit(MD_DELETED, &mddev->flags)) {
|
||||
ret = 0;
|
||||
mutex_unlock(&mddev->reconfig_mutex);
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -3236,6 +3236,7 @@ static int raid1_run(struct mddev *mddev)
|
||||
if (!mddev_is_dm(mddev)) {
|
||||
ret = raid1_set_limits(mddev);
|
||||
if (ret) {
|
||||
md_unregister_thread(mddev, &conf->thread);
|
||||
if (!mddev->private)
|
||||
raid1_free(mddev, conf);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user