From 5772a5242de00ecf99c187383b5e9d28ce674684 Mon Sep 17 00:00:00 2001 From: pschwan Date: Fri, 18 Oct 2002 17:40:06 +0000 Subject: [PATCH] bdevname changed in 2.5 --- lustre/include/linux/obd_support.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index 035bcc5..0f3005c 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -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; -- 1.8.3.1