staging/lustre/libcfs: remove CAPABILITY_VERSION tests
_LINUX_CAPABILITY_VERSION is only for backward compatibility in user space. Kernel code doesn't care about it. Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9a28b1881c
commit
efc9eb0289
1 changed files with 0 additions and 16 deletions
|
@ -80,29 +80,13 @@ int cfs_cap_raised(cfs_cap_t cap)
|
||||||
|
|
||||||
void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap)
|
void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap)
|
||||||
{
|
{
|
||||||
#if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330
|
|
||||||
*cap = kcap;
|
|
||||||
#elif defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x20071026
|
|
||||||
*cap = kcap[0];
|
|
||||||
#elif defined(_KERNEL_CAPABILITY_VERSION) && _KERNEL_CAPABILITY_VERSION == 0x20080522
|
|
||||||
/* XXX lost high byte */
|
/* XXX lost high byte */
|
||||||
*cap = kcap.cap[0];
|
*cap = kcap.cap[0];
|
||||||
#else
|
|
||||||
#error "need correct _KERNEL_CAPABILITY_VERSION "
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cfs_kernel_cap_unpack(kernel_cap_t *kcap, cfs_cap_t cap)
|
void cfs_kernel_cap_unpack(kernel_cap_t *kcap, cfs_cap_t cap)
|
||||||
{
|
{
|
||||||
#if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330
|
|
||||||
*kcap = cap;
|
|
||||||
#elif defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x20071026
|
|
||||||
(*kcap)[0] = cap;
|
|
||||||
#elif defined(_KERNEL_CAPABILITY_VERSION) && _KERNEL_CAPABILITY_VERSION == 0x20080522
|
|
||||||
kcap->cap[0] = cap;
|
kcap->cap[0] = cap;
|
||||||
#else
|
|
||||||
#error "need correct _KERNEL_CAPABILITY_VERSION "
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cfs_cap_t cfs_curproc_cap_pack(void)
|
cfs_cap_t cfs_curproc_cap_pack(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue