Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77609
b: refs/heads/master
c: 4898b53
h: refs/heads/master
i:
  77607: 58fbad8
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Jan 28, 2008
1 parent dbf1770 commit 84d3b6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 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: 650e9cfd14a1ac9e077d72962ea0a80946cdb6f8
refs/heads/master: 4898b53a5e3e4b9a58f1d89545b1e05c88c76798
16 changes: 4 additions & 12 deletions trunk/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

0 comments on commit 84d3b6f

Please sign in to comment.