diff options
| author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-09-09 19:23:57 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 19:39:13 -0400 |
| commit | 9ba00538ada7ecb4fb8bd71ba734a8eada987817 (patch) | |
| tree | 47544958a5564856d7225a2dc4040637d731c39d /drivers/md | |
| parent | a6fb0934f923f889055152cb0b033674f627460b (diff) | |
[PATCH] md: ensure bitmap_writeback_daemon handles shutdown properly.
mddev->bitmap gets clearred before the writeback daemon is stopped. So the
write_back daemon needs to be careful not to dereference the 'bitmap' if it is
NULL.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
| -rw-r--r-- | drivers/md/bitmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 90fe70d76a31..87145faac491 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
| @@ -1156,6 +1156,9 @@ static void bitmap_writeback_daemon(mddev_t *mddev) | |||
| 1156 | err = -EINTR; | 1156 | err = -EINTR; |
| 1157 | goto out; | 1157 | goto out; |
| 1158 | } | 1158 | } |
| 1159 | if (bitmap == NULL) | ||
| 1160 | /* about to be stopped. */ | ||
| 1161 | return; | ||
| 1159 | 1162 | ||
| 1160 | PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap)); | 1163 | PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap)); |
| 1161 | /* wait on bitmap page writebacks */ | 1164 | /* wait on bitmap page writebacks */ |
