diff options
-rw-r--r-- | drivers/md/bitmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 7fc028f9701e..663e6051bbad 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1408,7 +1408,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect | |||
1408 | return 0; | 1408 | return 0; |
1409 | } | 1409 | } |
1410 | 1410 | ||
1411 | if (unlikely((*bmc & COUNTER_MAX) == COUNTER_MAX)) { | 1411 | if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) { |
1412 | DEFINE_WAIT(__wait); | 1412 | DEFINE_WAIT(__wait); |
1413 | /* note that it is safe to do the prepare_to_wait | 1413 | /* note that it is safe to do the prepare_to_wait |
1414 | * after the test as long as we do it before dropping | 1414 | * after the test as long as we do it before dropping |
@@ -1480,10 +1480,10 @@ void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long secto | |||
1480 | sysfs_notify_dirent_safe(bitmap->sysfs_can_clear); | 1480 | sysfs_notify_dirent_safe(bitmap->sysfs_can_clear); |
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | if (!success && ! (*bmc & NEEDED_MASK)) | 1483 | if (!success && !NEEDED(*bmc)) |
1484 | *bmc |= NEEDED_MASK; | 1484 | *bmc |= NEEDED_MASK; |
1485 | 1485 | ||
1486 | if ((*bmc & COUNTER_MAX) == COUNTER_MAX) | 1486 | if (COUNTER(*bmc) == COUNTER_MAX) |
1487 | wake_up(&bitmap->overflow_wait); | 1487 | wake_up(&bitmap->overflow_wait); |
1488 | 1488 | ||
1489 | (*bmc)--; | 1489 | (*bmc)--; |