mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[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>
This commit is contained in:
parent
a6fb0934f9
commit
9ba00538ad
1 changed files with 3 additions and 0 deletions
|
@ -1156,6 +1156,9 @@ static void bitmap_writeback_daemon(mddev_t *mddev)
|
||||||
err = -EINTR;
|
err = -EINTR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (bitmap == NULL)
|
||||||
|
/* about to be stopped. */
|
||||||
|
return;
|
||||||
|
|
||||||
PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap));
|
PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap));
|
||||||
/* wait on bitmap page writebacks */
|
/* wait on bitmap page writebacks */
|
||||||
|
|
Loading…
Reference in a new issue