tree 47544958a5564856d7225a2dc4040637d731c39d
parent a6fb0934f923f889055152cb0b033674f627460b
author NeilBrown <[EMAIL PROTECTED]> Sat, 10 Sep 2005 06:23:57 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 06:39:13 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/md/bitmap.c |    3 +++
 1 files changed, 3 insertions(+)

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1156,6 +1156,9 @@ static void bitmap_writeback_daemon(mdde
                err = -EINTR;
                goto out;
        }
+       if (bitmap == NULL)
+               /* about to be stopped. */
+               return;
 
        PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap));
        /* wait on bitmap page writebacks */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to