#include <assert.h>
#include <libcfs/list.h>
+#include <libcfs/user-bitops.h>
#include <lnet/lnet.h>
#include <libcfs/kp30.h>
typedef struct { volatile int counter; } atomic_t;
#define ATOMIC_INIT(i) { (i) }
+
#define atomic_read(a) ((a)->counter)
#define atomic_set(a,b) do {(a)->counter = b; } while (0)
#define atomic_dec_and_test(a) ((--((a)->counter)) == 0)
#define atomic_inc(a) (((a)->counter)++)
#define atomic_dec(a) do { (a)->counter--; } while (0)
#define atomic_add(b,a) do {(a)->counter += b;} while (0)
+#define atomic_add_return(n,a) ((a)->counter = n)
+#define atomic_inc_return(a) atomic_add_return(1,a)
#define atomic_sub(b,a) do {(a)->counter -= b;} while (0)
+#define atomic_sub_return(n,a) ((a)->counter -= n)
+#define atomic_dec_return(a) atomic_sub_return(1,a)
#ifndef likely
#define likely(exp) (exp)
{
}
+#ifdef LIBLUSTRE_POSIX_ACL
+# ifndef posix_acl_xattr_entry
+# define posix_acl_xattr_entry xattr_acl_entry
+# endif
+# ifndef posix_acl_xattr_header
+# define posix_acl_xattr_header xattr_acl_header
+# endif
+# ifndef posix_acl_xattr_size
+# define posix_acl_xattr_size(entry) xattr_acl_size(entry)
+# endif
+# ifndef CONFIG_FS_POSIX_ACL
+# define CONFIG_FS_POSIX_ACL 1
+# endif
+#endif
+
#ifndef ENOTSUPP
#define ENOTSUPP ENOTSUP
#endif