Skip to content

Commit fad2d4e

Browse files
KAGA-KOKOaxboe
authored andcommitted
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. Cc: Philipp Reisner <[email protected]> Cc: Lars Ellenberg <[email protected]> Fixes: 7435e90 ("drbd: zero-out partial unaligned discards on local backend") Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 1f57f8d commit fad2d4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/block/drbd/drbd_req.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,8 +1244,8 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio, unsigned long
12441244
_drbd_start_io_acct(device, req);
12451245

12461246
/* process discards always from our submitter thread */
1247-
if ((bio_op(bio) & REQ_OP_WRITE_ZEROES) ||
1248-
(bio_op(bio) & REQ_OP_DISCARD))
1247+
if (bio_op(bio) == REQ_OP_WRITE_ZEROES ||
1248+
bio_op(bio) == REQ_OP_DISCARD)
12491249
goto queue_for_submitter_thread;
12501250

12511251
if (rw == WRITE && req->private_bio && req->i.size

0 commit comments

Comments
 (0)