summaryrefslogtreecommitdiffstats
path: root/Build.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:19 +0000
commit50f2ad8e92ef06e4dee6d7070049a96231d3a8ee (patch)
treeb7cda9c5caad5948899bf7d6551262d9d7d86d09 /Build.c
parentAdding upstream version 4.3+20240412. (diff)
downloadmdadm-50f2ad8e92ef06e4dee6d7070049a96231d3a8ee.tar.xz
mdadm-50f2ad8e92ef06e4dee6d7070049a96231d3a8ee.zip
Adding upstream version 4.3+20240723.upstream/4.3+20240723
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Build.c')
-rw-r--r--Build.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Build.c b/Build.c
index 1be90e4..052b1bc 100644
--- a/Build.c
+++ b/Build.c
@@ -168,13 +168,13 @@ int Build(struct mddev_ident *ident, struct mddev_dev *devlist, struct shape *s,
goto abort;
}
}
- if (bitmap_fd >= 0) {
- if (ioctl(mdfd, SET_BITMAP_FILE, bitmap_fd) < 0) {
- pr_err("Cannot set bitmap file for %s: %s\n", chosen_name,
- strerror(errno));
- goto abort;
- }
+ if (ioctl(mdfd, SET_BITMAP_FILE, bitmap_fd) < 0) {
+ pr_err("Cannot set bitmap file for %s: %s\n", chosen_name,
+ strerror(errno));
+ close(bitmap_fd);
+ goto abort;
}
+ close(bitmap_fd);
}
if (ioctl(mdfd, RUN_ARRAY, &param)) {
pr_err("RUN_ARRAY failed: %s\n", strerror(errno));