[PATCH 05/12] array_try_spare(): open_dev() returns -1 on error, not zero
From: <hidden>
Date: 2011-11-02 14:42:10
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: <hidden>
Date: 2011-11-02 14:42:10
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Jes Sorensen <redacted> Signed-off-by: Jes Sorensen <redacted> --- Incremental.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Incremental.c b/Incremental.c
index c2c9051..d3724a4 100644
--- a/Incremental.c
+++ b/Incremental.c@@ -884,7 +884,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol, * to obtain minimum spare size */ struct supertype *st3 = dup_super(st2); int mdfd = open_dev(mp->devnum); - if (!mdfd) { + if (mdfd < 0) { free(st3); goto next; }
--
1.7.6.4