forked from pool/mdadm
90d4e6869d
- Update mdadm to latest upstream state upto commit 582945c2d3bb. (jsc#PED-7542) 1) The testing changes are not included here. 2) Code clean up, and more helper routines added for Manage.c, Monitor.c, mdadm.c, ReadMe.c, super-intel.c, super0.c, super1.c, Create.c, Incremental.c and so on. 3) Man page update for mdadm.8.in. 4) Several memory leak and double free fixes. 5) Check /etc/initrd-release for whether systemd running on an initrd. - Manage: Block unsafe member failing 0062-Manage-Block-unsafe-member-failing.patch - Mdmonitor: Split alert() into separate functions 0063-Mdmonitor-Split-alert-into-separate-functions.patch - Monitor: block if monitor modes are combined. 0064-Monitor-block-if-monitor-modes-are-combined.patch - Update mdadm Monitor manual. 0065-Update-mdadm-Monitor-manual.patch - mdadm: create ident_init() 0066-mdadm-create-ident_init.patch - mdadm: Add option validation for --update-subarray 0067-mdadm-Add-option-validation-for-update-subarray.patch - Fix --update-subarray on active volume 0068-Fix-update-subarray-on-active-volume.patch - Add code specific update options to enum. 0069-Add-code-specific-update-options-to-enum.patch - super-ddf: Remove update_super_ddf. 0070-super-ddf-Remove-update_super_ddf.patch - super0: refactor the code for enum 0071-super0-refactor-the-code-for-enum.patch - super1: refactor the code for enum OBS-URL: https://build.opensuse.org/request/show/1137473 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=231
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From ba867e2ebaead20e3d9a7e62ef8fd940176c3110 Mon Sep 17 00:00:00 2001
|
|
From: Logan Gunthorpe <logang@deltatee.com>
|
|
Date: Wed, 1 Mar 2023 13:41:29 -0700
|
|
Subject: [PATCH] Create: goto abort_locked instead of return 1 in error path
|
|
|
|
The return 1 after the fstat_is_blkdev() check should be replaced
|
|
with an error return that goes through the error path to unlock
|
|
resources locked by this function.
|
|
|
|
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
|
|
Acked-by: Kinga Tanska <kinga.tanska@linux.intel.com>
|
|
Reviewed-by: Xiao Ni <xni@redhat.com>
|
|
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
|
|
Acked-by: Coly Li <colyli@suse.de>
|
|
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
|
|
---
|
|
Create.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/Create.c b/Create.c
|
|
index 953e737..2e8203e 100644
|
|
--- a/Create.c
|
|
+++ b/Create.c
|
|
@@ -939,7 +939,7 @@ int Create(struct supertype *st, char *mddev,
|
|
goto abort_locked;
|
|
}
|
|
if (!fstat_is_blkdev(fd, dv->devname, &rdev))
|
|
- return 1;
|
|
+ goto abort_locked;
|
|
inf->disk.major = major(rdev);
|
|
inf->disk.minor = minor(rdev);
|
|
}
|
|
--
|
|
2.35.3
|
|
|