Commit bd5d0856 authored by Miklos Szeredi's avatar Miklos Szeredi

vfs: export __inode_permission() to modules

We need to be able to check inode permissions (but not filesystem implied
permissions) for stackable filesystems.  Expose this interface for overlayfs.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 1c118596
...@@ -47,7 +47,6 @@ extern void __init chrdev_init(void); ...@@ -47,7 +47,6 @@ extern void __init chrdev_init(void);
/* /*
* namei.c * namei.c
*/ */
extern int __inode_permission(struct inode *, int);
extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *); extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
extern int vfs_path_lookup(struct dentry *, struct vfsmount *, extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
const char *, unsigned int, struct path *); const char *, unsigned int, struct path *);
......
...@@ -416,6 +416,7 @@ int __inode_permission(struct inode *inode, int mask) ...@@ -416,6 +416,7 @@ int __inode_permission(struct inode *inode, int mask)
return security_inode_permission(inode, mask); return security_inode_permission(inode, mask);
} }
EXPORT_SYMBOL(__inode_permission);
/** /**
* sb_permission - Check superblock-level permissions * sb_permission - Check superblock-level permissions
......
...@@ -2257,6 +2257,7 @@ extern sector_t bmap(struct inode *, sector_t); ...@@ -2257,6 +2257,7 @@ extern sector_t bmap(struct inode *, sector_t);
#endif #endif
extern int notify_change(struct dentry *, struct iattr *, struct inode **); extern int notify_change(struct dentry *, struct iattr *, struct inode **);
extern int inode_permission(struct inode *, int); extern int inode_permission(struct inode *, int);
extern int __inode_permission(struct inode *, int);
extern int generic_permission(struct inode *, int); extern int generic_permission(struct inode *, int);
static inline bool execute_ok(struct inode *inode) static inline bool execute_ok(struct inode *inode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment