Skip to content

Commit b109f52

Browse files
committed
ide: use blk_fs_request() check in ide-taskfile.c
Use blk_fs_request() in ide-taskfile.c instead of checking for: - rq->bio in ide_pio_datablock() and task_error() - rq->cmd_type == REQ_TYPE_ATA_TASKFILE in task_end_request() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent 03a2faa commit b109f52

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/ide/ide-taskfile.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
268268
ide_task_t *task = &drive->hwif->task;
269269
u8 saved_io_32bit = drive->io_32bit;
270270

271-
if (rq->bio) /* fs request */
271+
if (blk_fs_request(rq))
272272
rq->errors = 0;
273273

274274
if (task->tf_flags & IDE_TFLAG_IO_16BIT)
@@ -292,7 +292,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
292292
static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
293293
const char *s, u8 stat)
294294
{
295-
if (rq->bio) {
295+
if (blk_fs_request(rq)) {
296296
ide_hwif_t *hwif = drive->hwif;
297297
ide_task_t *task = &hwif->task;
298298
int sectors = hwif->nsect - hwif->nleft;
@@ -323,7 +323,7 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
323323

324324
void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
325325
{
326-
if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
326+
if (blk_fs_request(rq) == 0) {
327327
ide_task_t *task = rq->special;
328328
u8 err = ide_read_error(drive);
329329

0 commit comments

Comments
 (0)