[PATCH] md: fix /proc/mdstat refcounting
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 17 Oct 2006 07:09:38 +0000 (00:09 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 17 Oct 2006 15:18:43 +0000 (08:18 -0700)
I have seen mdadm oops after successfully unloading md module.

This patch privents from unloading md module while
mdadm is polling /proc/mdstat.

Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c

index 57fa64f93e5f1815ce57c398d8f1ae9cc64d32b1..f7f19088f3be4f05aada21cd33873cda2d91d56b 100644 (file)
@@ -4912,6 +4912,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
 }
 
 static struct file_operations md_seq_fops = {
+       .owner          = THIS_MODULE,
        .open           = md_seq_open,
        .read           = seq_read,
        .llseek         = seq_lseek,