drbd: Fix drbd_request_prepare() discard handling
Subsystems (2)
PATCH 1/1 drbd: Fix drbd_request_prepare() discard handling
Fix the test that verifies whether bio_op(bio) represents a discard or write zeroes operation. Compile-tested only.
Fixes 7435e9018f91 ("drbd: zero-out partial unaligned discards on local backend")
Signed-off-by Bart Van Assche <[email protected]>
Cc Philipp Reisner <[email protected]>
Cc Lars Ellenberg <[email protected]>
--- drivers/block/drbd/drbd_req.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/drbd/drbd_req.c +2 -2
@@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long_drbd_start_io_acct (device, req);/* process discards always from our submitter thread */ -if ((bio_op (bio) &REQ_OP_WRITE_ZEROES ) || - (bio_op (bio) &REQ_OP_DISCARD )) +if (bio_op (bio) ==REQ_OP_WRITE_ZEROES || +bio_op (bio) ==REQ_OP_DISCARD ) goto queue_for_submitter_thread; if (rw == WRITE && req->private_bio && req->i.size
Signature · 1 line
2.17.1
Looks good,
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 2 lines · Bart Van Assche
Fix the test that verifies whether
bio_op(bio)represents a discard or write zeroes operation. Compile-tested only.
Applied, thanks Bart.
Signature · 1 line
Jens Axboe