patch-2.1.43 linux/drivers/block/md.c

Next file: linux/drivers/char/Makefile
Previous file: linux/drivers/block/loop.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -202,9 +202,10 @@
 {
   int i;
   
-  if (inode->i_count>1 || md_dev[minor].busy>1) /* ioctl : one open channel */
+  if (atomic_read(&inode->i_count)>1 || md_dev[minor].busy>1) /* ioctl : one open channel */
   {
-    printk ("STOP_MD md%x failed : i_count=%d, busy=%d\n", minor, inode->i_count, md_dev[minor].busy);
+    printk ("STOP_MD md%x failed : i_count=%d, busy=%d\n", minor,
+	    atomic_read(&inode->i_count), md_dev[minor].busy);
     return -EBUSY;
   }
   

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov