From: Akinbou Mita Date: Mon, 26 Mar 2007 21:43:10 +0000 (+0200) Subject: md: fix /proc/mdstat refcounting X-Git-Tag: v2.6.16.46-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25c72f37099c2f32e8e6c7311735e7a3a036b178;p=thirdparty%2Fkernel%2Fstable.git md: fix /proc/mdstat refcounting I have seen mdadm oops after successfully unloading md module. This patch privents from unloading md module while mdadm is polling /proc/mdstat. Signed-off-by: Akinbou Mita Signed-off-by: Adrian Bunk --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 0471ebff482ff..1b1fae8b58b68 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4325,6 +4325,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,