diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2011-06-06 09:31:42 (GMT) |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-06-30 07:23:42 (GMT) |
commit | 8ccee20e3ef4e12dbf02a18f17d386569b1f73ee (patch) | |
tree | a725b7844412c1cf9079e46ce779d33338ae1d67 /drivers/block/drbd/drbd_bitmap.c | |
parent | 829c60878626be290a4c248e8f1b86a0d5cbd38b (diff) | |
download | linux-8ccee20e3ef4e12dbf02a18f17d386569b1f73ee.tar.xz |
drbd: don't cond_resched_lock with IRQs disabled
The last commit, drbd: add missing spinlock to bitmap receive,
introduced a cond_resched_lock(), where the lock in question is taken
with irqs disabled.
As we must not schedule with IRQs disabled,
and cond_resched_lock_irq() does not exist, yet,
we re-aquire the spin_lock_irq() for each bitmap page processed in turn.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_bitmap.c')
-rw-r--r-- | drivers/block/drbd/drbd_bitmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 1e89a74..61f4fae 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -1400,8 +1400,10 @@ void _drbd_bm_set_bits(struct drbd_conf *mdev, const unsigned long s, const unsi /* first and full pages, unless first page == last page */ for (page_nr = first_page; page_nr < last_page; page_nr++) { bm_set_full_words_within_one_page(mdev->bitmap, page_nr, first_word, last_word); - cond_resched_lock(&b->bm_lock); + spin_unlock_irq(&b->bm_lock); + cond_resched(); first_word = 0; + spin_lock_irq(&b->bm_lock); } /* last page (respectively only page, for first page == last page) */ |