diff options
author | Andreas Gruenbacher <andreas.gruenbacher@gmail.com> | 2014-09-11 14:29:10 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-11 16:41:29 +0200 |
commit | b47a06d10561bfe7317b1355b4b8e4168fc6b4b7 (patch) | |
tree | f2f67894080e487e8aadd24f2a1509a678debc59 /drivers/block/drbd | |
parent | drbd: Get rid of the __no_warn and __cond_lock macros (diff) | |
download | linux-b47a06d10561bfe7317b1355b4b8e4168fc6b4b7.tar.xz linux-b47a06d10561bfe7317b1355b4b8e4168fc6b4b7.zip |
drbd: Get rid of the WORK_PENDING macro
This macro doesn't add any value; just use test_bit() instead.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index b20cd214d371..3b74f08c8b83 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -1931,19 +1931,18 @@ void __update_timing_details( ++(*cb_nr); } -#define WORK_PENDING(work_bit, todo) (todo & (1UL << work_bit)) static void do_device_work(struct drbd_device *device, const unsigned long todo) { - if (WORK_PENDING(MD_SYNC, todo)) + if (test_bit(MD_SYNC, &todo)) do_md_sync(device); - if (WORK_PENDING(RS_DONE, todo) || - WORK_PENDING(RS_PROGRESS, todo)) - update_on_disk_bitmap(device, WORK_PENDING(RS_DONE, todo)); - if (WORK_PENDING(GO_DISKLESS, todo)) + if (test_bit(RS_DONE, &todo) || + test_bit(RS_PROGRESS, &todo)) + update_on_disk_bitmap(device, test_bit(RS_DONE, &todo)); + if (test_bit(GO_DISKLESS, &todo)) go_diskless(device); - if (WORK_PENDING(DESTROY_DISK, todo)) + if (test_bit(DESTROY_DISK, &todo)) drbd_ldev_destroy(device); - if (WORK_PENDING(RS_START, todo)) + if (test_bit(RS_START, &todo)) do_start_resync(device); } |