diff options
author | Blazej Kucman <blazej.kucman@intel.com> | 2021-06-15 16:45:39 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2021-07-16 16:23:05 +0200 |
commit | dca80fcd5d15c37ecbd82763e6fe4aee8c077bf9 (patch) | |
tree | a3e304069f060f9a5199185792797865019efabc /super-intel.c | |
parent | mdadm/super1: It needs to specify int32 for bitmap_offset (diff) | |
download | mdadm-dca80fcd5d15c37ecbd82763e6fe4aee8c077bf9.tar.xz mdadm-dca80fcd5d15c37ecbd82763e6fe4aee8c077bf9.zip |
Use dev_open in validate geometry container
Fix regression caused by the patch 1f5d54a06
("Manage: Call validate_geometry when adding drive to external container")
- mdmonitor passes to Manage() routine dev name as min:mjr.
The open() used in validate_geometry_container()
in both ddf and imsm requires path, replace open calls by dev_open,
which allows to use dev path and min:mjr.
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to '')
-rw-r--r-- | super-intel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c index fe45d933..5356ca51 100644 --- a/super-intel.c +++ b/super-intel.c @@ -6668,7 +6668,7 @@ static int validate_geometry_imsm_container(struct supertype *st, int level, if (!dev) return 1; - fd = open(dev, O_RDONLY|O_EXCL, 0); + fd = dev_open(dev, O_RDONLY|O_EXCL); if (fd < 0) { if (verbose > 0) pr_err("imsm: Cannot open %s: %s\n", |