Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117009
b: refs/heads/master
c: 7c5f78b
h: refs/heads/master
i:
  117007: 48be5a4
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Oct 21, 2008
1 parent fc809c0 commit 278e6fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: b673c3a8192e28f13e2050a4b82c1986be92cc15
refs/heads/master: 7c5f78b9d7f21937e46c26db82976df4b459c95c
10 changes: 3 additions & 7 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,10 @@ static struct bio *put_pending_exception(struct dm_snap_pending_exception *pe)
* the bios for the original write to the origin.
*/
if (primary_pe &&
atomic_dec_and_test(&primary_pe->ref_count))
atomic_dec_and_test(&primary_pe->ref_count)) {
origin_bios = bio_list_get(&primary_pe->origin_bios);
free_pending_exception(primary_pe);
}

/*
* Free the pe if it's not linked to an origin write or if
Expand All @@ -834,12 +836,6 @@ static struct bio *put_pending_exception(struct dm_snap_pending_exception *pe)
if (!primary_pe || primary_pe != pe)
free_pending_exception(pe);

/*
* Free the primary pe if nothing references it.
*/
if (primary_pe && !atomic_read(&primary_pe->ref_count))
free_pending_exception(primary_pe);

return origin_bios;
}

Expand Down

0 comments on commit 278e6fa

Please sign in to comment.