Message ID | 1256078825-11331-16-git-send-email-snitzer@redhat.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 7f0d261..f67bfff 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -1529,6 +1529,11 @@ static int snapshot_merge_map(struct dm_target *ti, struct bio *bio, bio->bi_bdev = s->origin->bdev; + if (bio_rw(bio) == WRITE) { + up_write(&s->lock); + return do_origin(s->origin, bio); + } + out_unlock: up_write(&s->lock);