From bf07e880958133a8ef26208447c04d28a4824f29 Mon Sep 17 00:00:00 2001 From: yangsheng <yangsheng> Date: Tue, 9 Sep 2008 15:43:12 +0000 Subject: [PATCH] Branch b1_6 b=16949 i=yury, deen Add labs(x) as a inline function because absent since 2.6.22. --- lustre/include/linux/lustre_compat25.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 881db60678..560f20bdb3 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -590,5 +590,19 @@ int ll_unregister_blkdev(unsigned int dev, const char *name) vfs_rename(old,old_dir,new,new_dir) #endif +#ifndef abs +static inline int abs(int x) +{ + return (x < 0) ? -x : x; +} +#endif + +#ifndef labs +static inline long labs(long x) +{ + return (x < 0) ? -x : x; +} +#endif + #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ -- GitLab