9 Star 0 Fork 13

src-anolis-os/mdadm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0099-Create-goto-abort_locked-instead-of-return-1-in-erro.patch 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
renbo02 提交于 2023-12-06 15:15 . update to mdadm-4.2-8
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 099/125] 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 953e7372..2e8203ec 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.38.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/mdadm.git
git@gitee.com:src-anolis-os/mdadm.git
src-anolis-os
mdadm
mdadm
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385