From: yangsheng Date: Tue, 9 Sep 2008 15:49:05 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_61~13 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6b2cd6118cdf245dd3d32318b913431ebcaf0d28;p=fs%2Flustre-release.git Branch HEAD b=16949 i=yury, deen Add labs(x) as a inline function because absent since 2.6.22. --- diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 8d575a65..6c36ac1 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -608,5 +608,19 @@ static inline int ll_crypto_hmac(struct crypto_tfm *tfm, #define cpu_to_node(cpu) 0 #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 */