Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154244
b: refs/heads/master
c: 2761e95
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Jun 22, 2009
1 parent 703d722 commit 5c684d9
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 531fe96364f30879753d46c1f52ab839e12d2e5d
refs/heads/master: 2761e95fe40ca0d01864310fa4d488d7c5e34e18
13 changes: 10 additions & 3 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,11 @@ static void dec_pending(struct dm_io *io, int error)
* Target requested pushing back the I/O.
*/
spin_lock_irqsave(&md->deferred_lock, flags);
if (__noflush_suspending(md))
bio_list_add_head(&md->deferred, io->bio);
else
if (__noflush_suspending(md)) {
if (!bio_barrier(io->bio))
bio_list_add_head(&md->deferred,
io->bio);
} else
/* noflush suspend was interrupted. */
io->error = -EIO;
spin_unlock_irqrestore(&md->deferred_lock, flags);
Expand Down Expand Up @@ -1458,6 +1460,11 @@ static void process_barrier(struct mapped_device *md, struct bio *bio)

if (md->barrier_error != DM_ENDIO_REQUEUE)
bio_endio(bio, md->barrier_error);
else {
spin_lock_irq(&md->deferred_lock);
bio_list_add_head(&md->deferred, bio);
spin_unlock_irq(&md->deferred_lock);
}
}

/*
Expand Down

0 comments on commit 5c684d9

Please sign in to comment.