diff options
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r-- | drivers/md/dm-snap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 594d1f6b4789..ab54f99b7c3b 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -931,6 +931,10 @@ static int __origin_write(struct list_head *snapshots, struct bio *bio) | |||
931 | if (!snap->valid) | 931 | if (!snap->valid) |
932 | continue; | 932 | continue; |
933 | 933 | ||
934 | /* Nothing to do if writing beyond end of snapshot */ | ||
935 | if (bio->bi_sector >= dm_table_get_size(snap->table)) | ||
936 | continue; | ||
937 | |||
934 | down_write(&snap->lock); | 938 | down_write(&snap->lock); |
935 | 939 | ||
936 | /* | 940 | /* |