diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/selinuxfs.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index f4b5a0baaec4..640feaa06c08 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -1533,11 +1533,6 @@ static int sel_make_initcon_files(struct dentry *dir) | |||
1533 | return 0; | 1533 | return 0; |
1534 | } | 1534 | } |
1535 | 1535 | ||
1536 | static inline unsigned int sel_div(unsigned long a, unsigned long b) | ||
1537 | { | ||
1538 | return a / b - (a % b < 0); | ||
1539 | } | ||
1540 | |||
1541 | static inline unsigned long sel_class_to_ino(u16 class) | 1536 | static inline unsigned long sel_class_to_ino(u16 class) |
1542 | { | 1537 | { |
1543 | return (class * (SEL_VEC_MAX + 1)) | SEL_CLASS_INO_OFFSET; | 1538 | return (class * (SEL_VEC_MAX + 1)) | SEL_CLASS_INO_OFFSET; |
@@ -1545,7 +1540,7 @@ static inline unsigned long sel_class_to_ino(u16 class) | |||
1545 | 1540 | ||
1546 | static inline u16 sel_ino_to_class(unsigned long ino) | 1541 | static inline u16 sel_ino_to_class(unsigned long ino) |
1547 | { | 1542 | { |
1548 | return sel_div(ino & SEL_INO_MASK, SEL_VEC_MAX + 1); | 1543 | return (ino & SEL_INO_MASK) / (SEL_VEC_MAX + 1); |
1549 | } | 1544 | } |
1550 | 1545 | ||
1551 | static inline unsigned long sel_perm_to_ino(u16 class, u32 perm) | 1546 | static inline unsigned long sel_perm_to_ino(u16 class, u32 perm) |