mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drbd: add context parameter to expect() macro
Originally-from: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Link: https://lore.kernel.org/r/20221201110349.1282687-6-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
e3fa02d7d4
commit
677b367275
@@ -1259,7 +1259,7 @@ static int _drbd_send_bitmap(struct drbd_device *device)
|
||||
struct bm_xfer_ctx c;
|
||||
int err;
|
||||
|
||||
if (!expect(device->bitmap))
|
||||
if (!expect(device, device->bitmap))
|
||||
return false;
|
||||
|
||||
if (get_ldev(device)) {
|
||||
@@ -2250,9 +2250,9 @@ static void do_retry(struct work_struct *ws)
|
||||
bool expected;
|
||||
|
||||
expected =
|
||||
expect(atomic_read(&req->completion_ref) == 0) &&
|
||||
expect(req->rq_state & RQ_POSTPONED) &&
|
||||
expect((req->rq_state & RQ_LOCAL_PENDING) == 0 ||
|
||||
expect(device, atomic_read(&req->completion_ref) == 0) &&
|
||||
expect(device, req->rq_state & RQ_POSTPONED) &&
|
||||
expect(device, (req->rq_state & RQ_LOCAL_PENDING) == 0 ||
|
||||
(req->rq_state & RQ_LOCAL_ABORTED) != 0);
|
||||
|
||||
if (!expected)
|
||||
|
||||
Reference in New Issue
Block a user