From: pschwan Date: Fri, 18 Oct 2002 17:40:06 +0000 (+0000) Subject: bdevname changed in 2.5 X-Git-Tag: 0.5.15~80 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5772a5242de00ecf99c187383b5e9d28ce674684;p=fs%2Flustre-release.git bdevname changed in 2.5 --- 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;