[DRBD-cvs] drbd by phil; Fixed one of the least-interesting-thing...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Mon, 26 Jan 2004 21:00:56 +0100 (CET)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_main.c
Log Message:
Fixed one of the least-interesting-things: DevFS for Linux-2.6.
BTW: I loaded it for the first time, and caused the first OOPS
on L26. Oopses on L26 show a decoded stack trace! How nice!
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_main.c,v
retrieving revision 1.73.2.111
retrieving revision 1.73.2.112
diff -u -3 -r1.73.2.111 -r1.73.2.112
--- drbd_main.c 26 Jan 2004 19:32:27 -0000 1.73.2.111
+++ drbd_main.c 26 Jan 2004 20:00:51 -0000 1.73.2.112
@@ -1257,7 +1257,10 @@
if (!drbd_blocksizes || !drbd_sizes)
goto Enomem;
#else
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) && defined(CONFIG_DEVFS_FS)
devfs_mk_dir(DEVICE_NAME);
+#endif
for (i = 0; i < minor_count; i++) {
drbd_dev *mdev = drbd_conf + i;
@@ -1414,10 +1417,13 @@
{
int i;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) && defined (CONFIG_DEVFS_FS)
+#ifdef CONFIG_DEVFS_FS
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
devfs_unregister(devfs_handle);
+# else
+ devfs_remove(DEVICE_NAME);
+# endif
#endif
- ONLY_IN_26( devfs_remove("nbd"); )
#warning "FIXME increase module refcount with each setup device"
/* then you need to tear down all devices