Whamcloud - gitweb
bdevname changed in 2.5
authorpschwan <pschwan>
Fri, 18 Oct 2002 17:40:06 +0000 (17:40 +0000)
committerpschwan <pschwan>
Fri, 18 Oct 2002 17:40:06 +0000 (17:40 +0000)
lustre/include/linux/obd_support.h

index 035bcc5..0f3005c 100644 (file)
@@ -126,14 +126,18 @@ do {                                                                         \
 
 static inline void OBD_FAIL_WRITE(int id, kdev_t dev)
 {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+# define __bdevname bdevname
+#endif
+
         if (OBD_FAIL_CHECK(id)) {
 #ifdef CONFIG_DEV_RDONLY
                 CERROR("obd_fail_loc=%x, fail write operation on %s\n",
-                       id, bdevname(dev));
+                       id, __bdevname(dev));
                 dev_set_rdonly(dev, 2);
 #else
                 CERROR("obd_fail_loc=%x, can't fail write operation on %s\n",
-                       id, bdevname(dev));
+                       id, __bdevname(dev));
 #endif
                 /* We set FAIL_ONCE because we never "un-fail" a device */
                 obd_fail_loc |= OBD_FAILED | OBD_FAIL_ONCE;