Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43843
b: refs/heads/master
c: 31c93a0
h: refs/heads/master
i:
  43841: de4ae3a
  43839: 42b5abd
v: v3
  • Loading branch information
Milan Broz authored and Linus Torvalds committed Dec 8, 2006
1 parent c0cc35a commit c01f3dd
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 45e157206c732613d1c07e8ceeb1a3e497fb2abf
refs/heads/master: 31c93a0c29bf96efd806ccf4ee81cacf04f255de
19 changes: 12 additions & 7 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,17 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
return r;
}

static void __free_exceptions(struct dm_snapshot *s)
{
kcopyd_client_destroy(s->kcopyd_client);
s->kcopyd_client = NULL;

exit_exception_table(&s->pending, pending_cache);
exit_exception_table(&s->complete, exception_cache);

s->store.destroy(&s->store);
}

static void snapshot_dtr(struct dm_target *ti)
{
struct dm_snapshot *s = (struct dm_snapshot *) ti->private;
Expand All @@ -574,13 +585,7 @@ static void snapshot_dtr(struct dm_target *ti)
/* After this returns there can be no new kcopyd jobs. */
unregister_snapshot(s);

kcopyd_client_destroy(s->kcopyd_client);

exit_exception_table(&s->pending, pending_cache);
exit_exception_table(&s->complete, exception_cache);

/* Deallocate memory used */
s->store.destroy(&s->store);
__free_exceptions(s);

dm_put_device(ti, s->origin);
dm_put_device(ti, s->cow);
Expand Down

0 comments on commit c01f3dd

Please sign in to comment.