diff options
author | Jens Axboe <axboe@kernel.dk> | 2012-11-30 15:20:15 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-11-30 15:20:15 -0500 |
commit | 2cecb7309897c872b977a60d53e5de0af4265dd6 (patch) | |
tree | d48284c1edb9ed24d3afa57ba18441d345a5b20c | |
parent | 7b5a35225b0d4fd779cf79d7624e63d1957f6c4d (diff) |
drbd: fixup after wait_even_lock_irq() addition to generic code
Compiling drbd yields:
drivers/block/drbd/drbd_state.c: In function ‘_conn_request_state’:
drivers/block/drbd/drbd_state.c:1804:5: error: macro "wait_event_lock_irq" passed 4 arguments, but takes just 3
drivers/block/drbd/drbd_state.c:1801:3: error: ‘wait_event_lock_irq’ undeclared (first use in this function)
drivers/block/drbd/drbd_state.c:1801:3: note: each undeclared identifier is reported only once for each function it appears in
drivers/block/drbd/drbd_state.c: At top level:
drivers/block/drbd/drbd_state.c:1734:1: warning: ‘_conn_rq_cond’ defined but not used [-Wunused-function]
Due to drbd having copied the MD definition for wait_event_lock_irq()
as well. Kill them.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 27 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_state.c | 3 |
2 files changed, 1 insertions, 29 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index ef72a72814c7..6b51afa1aae1 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -2334,30 +2334,3 @@ static inline void drbd_md_flush(struct drbd_conf *mdev) | |||
2334 | } | 2334 | } |
2335 | 2335 | ||
2336 | #endif | 2336 | #endif |
2337 | |||
2338 | /* This is defined in drivers/md/md.h as well. Should go into wait.h */ | ||
2339 | #define __wait_event_lock_irq(wq, condition, lock, cmd) \ | ||
2340 | do { \ | ||
2341 | wait_queue_t __wait; \ | ||
2342 | init_waitqueue_entry(&__wait, current); \ | ||
2343 | \ | ||
2344 | add_wait_queue(&wq, &__wait); \ | ||
2345 | for (;;) { \ | ||
2346 | set_current_state(TASK_UNINTERRUPTIBLE); \ | ||
2347 | if (condition) \ | ||
2348 | break; \ | ||
2349 | spin_unlock_irq(&lock); \ | ||
2350 | cmd; \ | ||
2351 | schedule(); \ | ||
2352 | spin_lock_irq(&lock); \ | ||
2353 | } \ | ||
2354 | current->state = TASK_RUNNING; \ | ||
2355 | remove_wait_queue(&wq, &__wait); \ | ||
2356 | } while (0) | ||
2357 | |||
2358 | #define wait_event_lock_irq(wq, condition, lock, cmd) \ | ||
2359 | do { \ | ||
2360 | if (condition) \ | ||
2361 | break; \ | ||
2362 | __wait_event_lock_irq(wq, condition, lock, cmd); \ | ||
2363 | } while (0) | ||
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 69ef35266bac..53bf6182bac4 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c | |||
@@ -1800,8 +1800,7 @@ _conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_ | |||
1800 | spin_lock_irq(&tconn->req_lock); | 1800 | spin_lock_irq(&tconn->req_lock); |
1801 | wait_event_lock_irq(tconn->ping_wait, | 1801 | wait_event_lock_irq(tconn->ping_wait, |
1802 | (rv = _conn_rq_cond(tconn, mask, val)), | 1802 | (rv = _conn_rq_cond(tconn, mask, val)), |
1803 | tconn->req_lock, | 1803 | tconn->req_lock); |
1804 | ); | ||
1805 | clear_bit(CONN_WD_ST_CHG_REQ, &tconn->flags); | 1804 | clear_bit(CONN_WD_ST_CHG_REQ, &tconn->flags); |
1806 | if (rv < SS_SUCCESS) | 1805 | if (rv < SS_SUCCESS) |
1807 | goto abort; | 1806 | goto abort; |