diff options
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index e59694bc5758..c5fa4c2a5af1 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -271,7 +271,8 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde | |||
271 | return ERR_PTR(-ENOMEM); | 271 | return ERR_PTR(-ENOMEM); |
272 | 272 | ||
273 | ITERATE_RDEV(mddev, rdev, tmp) { | 273 | ITERATE_RDEV(mddev, rdev, tmp) { |
274 | if (! rdev->in_sync || rdev->faulty) | 274 | if (! test_bit(In_sync, &rdev->flags) |
275 | || test_bit(Faulty, &rdev->flags)) | ||
275 | continue; | 276 | continue; |
276 | 277 | ||
277 | target = (rdev->sb_offset << 1) + offset + index * (PAGE_SIZE/512); | 278 | target = (rdev->sb_offset << 1) + offset + index * (PAGE_SIZE/512); |
@@ -291,7 +292,8 @@ static int write_sb_page(mddev_t *mddev, long offset, struct page *page, int wai | |||
291 | struct list_head *tmp; | 292 | struct list_head *tmp; |
292 | 293 | ||
293 | ITERATE_RDEV(mddev, rdev, tmp) | 294 | ITERATE_RDEV(mddev, rdev, tmp) |
294 | if (rdev->in_sync && !rdev->faulty) | 295 | if (test_bit(In_sync, &rdev->flags) |
296 | && !test_bit(Faulty, &rdev->flags)) | ||
295 | md_super_write(mddev, rdev, | 297 | md_super_write(mddev, rdev, |
296 | (rdev->sb_offset<<1) + offset | 298 | (rdev->sb_offset<<1) + offset |
297 | + page->index * (PAGE_SIZE/512), | 299 | + page->index * (PAGE_SIZE/512), |