Whamcloud - gitweb
LU-2850 kernel: 3.8 upstream kills daemonize()
[fs/lustre-release.git] / libcfs / include / libcfs / posix / libcfs.h
index 95ec2ab..305b74b 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 typedef unsigned long long cfs_cycles_t;
 
 #define IS_ERR(a) ((unsigned long)(a) > (unsigned long)-1000L)
+#define IS_ERR_VALUE(a) (IS_ERR(a))
 #define PTR_ERR(a) ((long)(a))
 #define ERR_PTR(a) ((void*)((long)(a)))
 
@@ -120,14 +121,8 @@ typedef unsigned long long cfs_cycles_t;
 #include <mntent.h>
 #endif
 
-typedef struct file cfs_file_t;
-typedef struct dentry cfs_dentry_t;
-#ifdef __linux__
-typedef struct dirent64 cfs_dirent_t;
-#endif
-
-#define cfs_get_fd(x)   NULL
-#define cfs_put_file(f) do {} while (0)
+#define fget(x) NULL
+#define fput(f) do {} while (0)
 
 #ifdef __linux__
 /* Userpace byte flipping */
@@ -496,9 +491,10 @@ static inline void rb_link_node(struct rb_node *node, struct rb_node *parent,
 
 typedef ssize_t (*read_actor_t)();
 
-#define CFS_IFSHIFT 12
-
-#define CFS_IFTODT(type)           (((type) & S_IFMT) >> CFS_IFSHIFT)
-#define CFS_DTTOIF(dirtype)        ((dirtype) << CFS_IFSHIFT)
+# ifndef IFTODT
+#  define IFSHIFT              12
+#  define IFTODT(type)         (((type) & S_IFMT) >> IFSHIFT)
+#  define DTTOIF(dirtype)      ((dirtype) << IFSHIFT)
+# endif
 
 #endif