diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-10-24 00:14:35 +0200 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2015-04-17 15:51:00 +0800 |
commit | 96bd0c53e4204392144978e5a40f4699570be22b (patch) | |
tree | 2159114f3ad15bf5b8a7d6979b3e548fc4799f91 | |
parent | 5c45fc6a9c14be17ae4d203d35fe82c6b4575de4 (diff) |
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: Miklos Szeredi <mszeredi@suse.cz>
(cherry picked from commit bd5d08569cc379f8366663a61558a9ce17c2e460)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r-- | fs/internal.h | 1 | ||||
-rw-r--r-- | fs/namei.c | 1 | ||||
-rw-r--r-- | include/linux/fs.h | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/fs/internal.h b/fs/internal.h index 873cdf544d54..dd41b12c13f1 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -42,7 +42,6 @@ extern void __init chrdev_init(void); /* * 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 vfs_path_lookup(struct dentry *, struct vfsmount *, const char *, unsigned int, struct path *); diff --git a/fs/namei.c b/fs/namei.c index b987228e6afb..56b30af6a7f6 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -415,6 +415,7 @@ int __inode_permission(struct inode *inode, int mask) return security_inode_permission(inode, mask); } +EXPORT_SYMBOL(__inode_permission); /** * sb_permission - Check superblock-level permissions diff --git a/include/linux/fs.h b/include/linux/fs.h index 5bcbbf3a0f00..82c78d6a2006 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2298,6 +2298,7 @@ extern sector_t bmap(struct inode *, sector_t); #endif 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 generic_permission(struct inode *, int); static inline bool execute_ok(struct inode *inode) |