Skip to content

Commit

Permalink
[PATCH] device-mapper snapshot: fix invalidation
Browse files Browse the repository at this point in the history
When a snapshot becomes invalid, s->valid is set to 0.  In this state, a
snapshot can no longer be accessed.

When s->lock is acquired, before doing anything else, s->valid must be checked
to ensure the snapshot remains valid.

This patch eliminates some races (that may cause panics) by adding some
missing checks.  At the same time, some unnecessary levels of indentation are
removed and snapshot invalidation is moved into a single function that always
generates a device-mapper event.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alasdair G Kergon authored and Linus Torvalds committed Mar 27, 2006
1 parent b4b610f commit 76df1c6
Showing 1 changed file with 174 additions and 121 deletions.
Loading

0 comments on commit 76df1c6

Please sign in to comment.