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]>

### Diffstat output
 ./drivers/md/bitmap.c |    3 +++
 1 file changed, 3 insertions(+)

diff ./drivers/md/bitmap.c~current~ ./drivers/md/bitmap.c
--- ./drivers/md/bitmap.c~current~      2005-08-29 16:32:20.000000000 +1000
+++ ./drivers/md/bitmap.c       2005-08-29 16:46:50.000000000 +1000
@@ -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 linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to