Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101204
b: refs/heads/master
c: 5f2e1ce
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Bartlomiej Zolnierkiewicz committed Jul 15, 2008
1 parent a0128bc commit fbd649f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b114715ed63f3a4fdf790f5df61364fc4adadf1
refs/heads/master: 5f2e1ceef45ac07d7c52d16de2531a56c453bb0f
27 changes: 3 additions & 24 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1584,23 +1584,11 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
{
unsigned long flags;
ide_hwgroup_t *hwgroup = HWGROUP(drive);
DECLARE_COMPLETION_ONSTACK(wait);
int where = ELEVATOR_INSERT_BACK, err;
int must_wait = (action == ide_wait || action == ide_head_wait);
int where = ELEVATOR_INSERT_BACK;

rq->errors = 0;

/*
* we need to hold an extra reference to request for safe inspection
* after completion
*/
if (must_wait) {
rq->ref_count++;
rq->end_io_data = &wait;
rq->end_io = blk_end_sync_rq;
}

if (action == ide_preempt || action == ide_head_wait)
if (action == ide_preempt)
where = ELEVATOR_INSERT_FRONT;

spin_lock_irqsave(&ide_lock, flags);
Expand All @@ -1613,16 +1601,7 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
do_ide_request(drive->queue);
spin_unlock_irqrestore(&ide_lock, flags);

err = 0;
if (must_wait) {
wait_for_completion(&wait);
if (rq->errors)
err = -EIO;

blk_put_request(rq);
}

return err;
return 0;
}

EXPORT_SYMBOL(ide_do_drive_cmd);
Expand Down

0 comments on commit fbd649f

Please sign in to comment.