Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40507
b: refs/heads/master
c: 2fe30a3
h: refs/heads/master
i:
  40505: e4be922
  40503: db56734
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Oct 31, 2006
1 parent 5d6d95e commit dd67386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 33f775eea185e8df7701c4afc2c8fcee85c83282
refs/heads/master: 2fe30a34a141c2188ff2cdd670d031088d9c5d20
9 changes: 6 additions & 3 deletions trunk/arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ static DEFINE_SPINLOCK(ubd_io_lock);

static DEFINE_MUTEX(ubd_lock);

static void (*do_ubd)(void);
/* XXX - this made sense in 2.4 days, now it's only used as a boolean, and
* probably it doesn't make sense even for that. */
static int do_ubd;

static int ubd_open(struct inode * inode, struct file * filp);
static int ubd_release(struct inode * inode, struct file * file);
Expand Down Expand Up @@ -508,14 +510,15 @@ static inline void ubd_finish(struct request *req, int error)
spin_unlock(&ubd_io_lock);
}

/* XXX - move this inside ubd_intr. */
/* Called without ubd_io_lock held, and only in interrupt context. */
static void ubd_handler(void)
{
struct io_thread_req req;
struct request *rq = elv_next_request(ubd_queue);
int n;

do_ubd = NULL;
do_ubd = 0;
intr_count++;
n = os_read_file(thread_fd, &req, sizeof(req));
if(n != sizeof(req)){
Expand Down Expand Up @@ -1043,7 +1046,7 @@ static void do_ubd_request(request_queue_t *q)
return;
err = prepare_request(req, &io_req);
if(!err){
do_ubd = ubd_handler;
do_ubd = 1;
n = os_write_file(thread_fd, (char *) &io_req,
sizeof(io_req));
if(n != sizeof(io_req))
Expand Down

0 comments on commit dd67386

Please sign in to comment.