Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81998
b: refs/heads/master
c: 8bdd3f8
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Feb 1, 2008
1 parent e60fa18 commit 4ff37e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 4f4f6c2502474f51654a699d7127d86c2f87075a
refs/heads/master: 8bdd3f8a6993fef2f364aca6e1a59559405773a2
10 changes: 6 additions & 4 deletions trunk/block/as-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ static void free_as_io_context(struct as_io_context *aic)

static void as_trim(struct io_context *ioc)
{
spin_lock(&ioc->lock);
spin_lock_irq(&ioc->lock);
if (ioc->aic)
free_as_io_context(ioc->aic);
ioc->aic = NULL;
spin_unlock(&ioc->lock);
spin_unlock_irq(&ioc->lock);
}

/* Called when the task exits */
Expand Down Expand Up @@ -235,10 +235,12 @@ static void as_put_io_context(struct request *rq)
aic = RQ_IOC(rq)->aic;

if (rq_is_sync(rq) && aic) {
spin_lock(&aic->lock);
unsigned long flags;

spin_lock_irqsave(&aic->lock, flags);
set_bit(AS_TASK_IORUNNING, &aic->state);
aic->last_end_request = jiffies;
spin_unlock(&aic->lock);
spin_unlock_irqrestore(&aic->lock, flags);
}

put_io_context(RQ_IOC(rq));
Expand Down

0 comments on commit 4ff37e8

Please sign in to comment.