static void __invalidate_snapshot(struct dm_snapshot *s, int err)
{
+ struct dm_snapshare *ss;
char *tmp_str = "ES_INVALIDATE";
if (!s->valid)
@@ -734,12 +823,15 @@ static void __invalidate_snapshot(struct
else if (err == -ENOMEM)
DMERR("Invalidating snapshot: Unable to allocate exception.");
- if (s->store->type->message)
- s->store->type->message(s->store, 1, &tmp_str);
+
+ /* Invalidating the snapshot will invalidate all snapshares. */
+ list_for_each_entry(ss, &s->shared_list, shared_list)
+ if (ss->store->type->message)
+ ss->store->type->message(ss->store, 1, &tmp_str);
s->valid = 0;
- dm_table_event(s->store->ti->table);
+ dm_table_event(ss->store->ti->table);
}