Skip to content

Commit ea6787c

Browse files
johnpgarrymartinkpetersen
authored andcommitted
scsi: block: Don't check REQ_ATOMIC for reads
We check in submit_bio_noacct() if flag REQ_ATOMIC is set for both read and write operations, and then validate the atomic operation if set. Flag REQ_ATOMIC can only be set for writes, so don't bother checking for reads. Fixes: 9da3d1e ("block: Add core atomic write support") Signed-off-by: John Garry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Kanchan Joshi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0c150b3 commit ea6787c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

block/blk-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ void submit_bio_noacct(struct bio *bio)
799799

800800
switch (bio_op(bio)) {
801801
case REQ_OP_READ:
802+
break;
802803
case REQ_OP_WRITE:
803804
if (bio->bi_opf & REQ_ATOMIC) {
804805
status = blk_validate_atomic_write_op_size(q, bio);

0 commit comments

Comments
 (0)