summary refs log tree commit diff
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2006-03-27 01:17:45 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:44:58 -0800
commit76df1c651b66bdf07d60b3d60789feb5f58d73e3 (patch)
tree5458257a6a089396ac6ed5883a916af542ca8477 /drivers/md/dm-raid1.c
parentb4b610f684d13bf8691feeae5d4d7a8bd1f1033e (diff)
downloadlinux-76df1c651b66bdf07d60b3d60789feb5f58d73e3.tar.gz
[PATCH] device-mapper snapshot: fix invalidation
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>
Diffstat (limited to 'drivers/md/dm-raid1.c')
0 files changed, 0 insertions, 0 deletions