diff options
author | NeilBrown <neilb@suse.de> | 2009-06-04 12:29:21 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-04 12:29:21 +1000 |
commit | 4291d691b66f65695b5b4be22b80fd00da73b544 (patch) | |
tree | 6b9d8054343e352608b940517051a588bfa54d67 /super-intel.c | |
parent | 6e92d480f765dc22a5abaa5658ad603353648c1c (diff) | |
download | mdadm-4291d691b66f65695b5b4be22b80fd00da73b544.tar.gz |
super-intel: fix test on failed_disk_num.
We sometimes set failed_disk_num to ~0.
However we cannot test for equality with that as failed_disk_num
is 8bit and ~0 is probably 32bit with lots of 1's.
So test if ~failed_disk_num is 0 instead.
Reported-By: "Mr. James W. Laferriere" <babydr@baby-dragons.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-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 73fe5fa..7e2a086 100644 --- a/super-intel.c +++ b/super-intel.c @@ -3629,7 +3629,7 @@ static int mark_failure(struct imsm_dev *dev, struct imsm_disk *disk, int idx) disk->status |= FAILED_DISK; set_imsm_ord_tbl_ent(map, slot, idx | IMSM_ORD_REBUILD); - if (map->failed_disk_num == ~0) + if (~map->failed_disk_num == 0) map->failed_disk_num = slot; return 1; } |