summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-06-09 11:42:57 +1000
committerNeilBrown <neilb@suse.de>2011-06-09 11:42:57 +1000
commit27d5ea04d08bea37bf651090e5f3c573d2390df8 (patch)
treecb951827fa265699eb5179c741f202ca4d82a154 /drivers/md
parent01393f3d5836b7d62e925e6f4658a7eb22b83a11 (diff)
downloadlwn-27d5ea04d08bea37bf651090e5f3c573d2390df8.tar.gz
lwn-27d5ea04d08bea37bf651090e5f3c573d2390df8.zip
md/bitmap: use proper accessor macro
Use COUNTER()/NEEDED() macro instead of open-coding them. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bitmap.c6
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
return 0;
}
- if (unlikely((*bmc & COUNTER_MAX) == COUNTER_MAX)) {
+ if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) {
DEFINE_WAIT(__wait);
/* note that it is safe to do the prepare_to_wait
* 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
sysfs_notify_dirent_safe(bitmap->sysfs_can_clear);
}
- if (!success && ! (*bmc & NEEDED_MASK))
+ if (!success && !NEEDED(*bmc))
*bmc |= NEEDED_MASK;
- if ((*bmc & COUNTER_MAX) == COUNTER_MAX)
+ if (COUNTER(*bmc) == COUNTER_MAX)
wake_up(&bitmap->overflow_wait);
(*bmc)--;