Whamcloud - gitweb
LU-9859 libcfs: remove linux-curproc.c
[fs/lustre-release.git] / libcfs / include / libcfs / curproc.h
index 8501041..296e2d0 100644 (file)
@@ -51,8 +51,11 @@ typedef __u32 cfs_cap_t;
                         BIT(CAP_SYS_BOOT)              |       \
                         BIT(CAP_SYS_RESOURCE))
 
-cfs_cap_t cfs_curproc_cap_pack(void);
-void cfs_curproc_cap_unpack(cfs_cap_t cap);
+static inline cfs_cap_t cfs_curproc_cap_pack(void)
+{
+       /* cfs_cap_t is only the first word of kernel_cap_t */
+       return (cfs_cap_t)(current_cap().cap[0]);
+}
 
 /* __LIBCFS_CURPROC_H__ */
 #endif