mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 12:07:12 +07:00
8a24454869
There is nothing modular in this file, and no reason to drag in all the extra headers that module.h brings with it, since it just slows down compiles. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
20 lines
597 B
C
20 lines
597 B
C
#include <linux/fs.h>
|
|
|
|
#ifdef CONFIG_CGROUP_DEVICE
|
|
extern int __devcgroup_inode_permission(struct inode *inode, int mask);
|
|
extern int devcgroup_inode_mknod(int mode, dev_t dev);
|
|
static inline int devcgroup_inode_permission(struct inode *inode, int mask)
|
|
{
|
|
if (likely(!inode->i_rdev))
|
|
return 0;
|
|
if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode))
|
|
return 0;
|
|
return __devcgroup_inode_permission(inode, mask);
|
|
}
|
|
#else
|
|
static inline int devcgroup_inode_permission(struct inode *inode, int mask)
|
|
{ return 0; }
|
|
static inline int devcgroup_inode_mknod(int mode, dev_t dev)
|
|
{ return 0; }
|
|
#endif
|