]> err.no Git - linux-2.6/blobdiff - drivers/md/dm-snap.c
[PATCH] blk: Use blk_queue_xxx functions to set parameters
[linux-2.6] / drivers / md / dm-snap.c
index 594d1f6b4789e7e864ae131987ebc078ed0bad23..ab54f99b7c3b27cfd40a023bae56f9e0ed0b0f18 100644 (file)
@@ -931,6 +931,10 @@ static int __origin_write(struct list_head *snapshots, struct bio *bio)
                if (!snap->valid)
                        continue;
 
+               /* Nothing to do if writing beyond end of snapshot */
+               if (bio->bi_sector >= dm_table_get_size(snap->table))
+                       continue;
+
                down_write(&snap->lock);
 
                /*