Merge branch 'for-4.11/next' into for-4.11/linus-merge

Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Jens Axboe
2017-02-17 14:08:19 -07:00
171 changed files with 2500 additions and 2856 deletions

View File

@@ -437,14 +437,17 @@ static int sr_init_command(struct scsi_cmnd *SCpnt)
goto out;
}
if (rq_data_dir(rq) == WRITE) {
switch (req_op(rq)) {
case REQ_OP_WRITE:
if (!cd->writeable)
goto out;
SCpnt->cmnd[0] = WRITE_10;
cd->cdi.media_written = 1;
} else if (rq_data_dir(rq) == READ) {
break;
case REQ_OP_READ:
SCpnt->cmnd[0] = READ_10;
} else {
break;
default:
blk_dump_rq_flags(rq, "Unknown sr command");
goto out;
}