Skip to content

Commit

Permalink
Merge branch 'blk-end-request' of git://git.kernel.dk/linux-2.6-block
Browse files Browse the repository at this point in the history
* 'blk-end-request' of git://git.kernel.dk/linux-2.6-block: (30 commits)
  blk_end_request: changing xsysace (take 4)
  blk_end_request: changing ub (take 4)
  blk_end_request: cleanup of request completion (take 4)
  blk_end_request: cleanup 'uptodate' related code (take 4)
  blk_end_request: remove/unexport end_that_request_* (take 4)
  blk_end_request: changing scsi (take 4)
  blk_end_request: add bidi completion interface (take 4)
  blk_end_request: changing ide-cd (take 4)
  blk_end_request: add callback feature (take 4)
  blk_end_request: changing ide normal caller (take 4)
  blk_end_request: changing cpqarray (take 4)
  blk_end_request: changing cciss (take 4)
  blk_end_request: changing ide-scsi (take 4)
  blk_end_request: changing s390 (take 4)
  blk_end_request: changing mmc (take 4)
  blk_end_request: changing i2o_block (take 4)
  blk_end_request: changing viocd (take 4)
  blk_end_request: changing xen-blkfront (take 4)
  blk_end_request: changing viodasd (take 4)
  blk_end_request: changing sx8 (take 4)
  ...
  • Loading branch information
Linus Torvalds committed Jan 28, 2008
2 parents 68fbda7 + a65b586 commit f0f0052
Show file tree
Hide file tree
Showing 26 changed files with 416 additions and 374 deletions.
16 changes: 6 additions & 10 deletions arch/arm/plat-omap/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ static void mbox_tx_work(struct work_struct *work)
}

spin_lock(q->queue_lock);
blkdev_dequeue_request(rq);
end_that_request_last(rq, 0);
if (__blk_end_request(rq, 0, 0))
BUG();
spin_unlock(q->queue_lock);
}
}
Expand Down Expand Up @@ -149,10 +149,8 @@ static void mbox_rx_work(struct work_struct *work)

msg = (mbox_msg_t) rq->data;

spin_lock_irqsave(q->queue_lock, flags);
blkdev_dequeue_request(rq);
end_that_request_last(rq, 0);
spin_unlock_irqrestore(q->queue_lock, flags);
if (blk_end_request(rq, 0, 0))
BUG();

mbox->rxq->callback((void *)msg);
}
Expand Down Expand Up @@ -263,10 +261,8 @@ omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf)

*p = (mbox_msg_t) rq->data;

spin_lock_irqsave(q->queue_lock, flags);
blkdev_dequeue_request(rq);
end_that_request_last(rq, 0);
spin_unlock_irqrestore(q->queue_lock, flags);
if (blk_end_request(rq, 0, 0))
BUG();

if (unlikely(mbox_seq_test(mbox, *p))) {
pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p);
Expand Down
16 changes: 4 additions & 12 deletions arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,28 +475,20 @@ static void do_ubd_request(struct request_queue * q);
/* Only changed by ubd_init, which is an initcall. */
int thread_fd = -1;

static void ubd_end_request(struct request *req, int bytes, int uptodate)
static void ubd_end_request(struct request *req, int bytes, int error)
{
if (!end_that_request_first(req, uptodate, bytes >> 9)) {
struct ubd *dev = req->rq_disk->private_data;
unsigned long flags;

add_disk_randomness(req->rq_disk);
spin_lock_irqsave(&dev->lock, flags);
end_that_request_last(req, uptodate);
spin_unlock_irqrestore(&dev->lock, flags);
}
blk_end_request(req, error, bytes);
}

/* Callable only from interrupt context - otherwise you need to do
* spin_lock_irq()/spin_lock_irqsave() */
static inline void ubd_finish(struct request *req, int bytes)
{
if(bytes < 0){
ubd_end_request(req, 0, 0);
ubd_end_request(req, 0, -EIO);
return;
}
ubd_end_request(req, bytes, 1);
ubd_end_request(req, bytes, 0);
}

static LIST_HEAD(restart);
Expand Down
Loading

0 comments on commit f0f0052

Please sign in to comment.