Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118956
b: refs/heads/master
c: d221d2e
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Nov 13, 2008
1 parent 86b4566 commit e39ef20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 14e98c5ca8bed825f65cbf11cb0ffd2c09dac2f4
refs/heads/master: d221d2e77696e70e94b13989ea15db2ba5b34f8e
10 changes: 5 additions & 5 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static void start_io_acct(struct dm_io *io)
dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending);
}

static int end_io_acct(struct dm_io *io)
static void end_io_acct(struct dm_io *io)
{
struct mapped_device *md = io->md;
struct bio *bio = io->bio;
Expand All @@ -391,7 +391,9 @@ static int end_io_acct(struct dm_io *io)
dm_disk(md)->part0.in_flight = pending =
atomic_dec_return(&md->pending);

return !pending;
/* nudge anyone waiting on suspend queue */
if (!pending)
wake_up(&md->wait);
}

/*
Expand Down Expand Up @@ -499,9 +501,7 @@ static void dec_pending(struct dm_io *io, int error)
spin_unlock_irqrestore(&io->md->pushback_lock, flags);
}

if (end_io_acct(io))
/* nudge anyone waiting on suspend queue */
wake_up(&io->md->wait);
end_io_acct(io);

if (io->error != DM_ENDIO_REQUEUE) {
blk_add_trace_bio(io->md->queue, io->bio,
Expand Down

0 comments on commit e39ef20

Please sign in to comment.