1 From 04a60da13369fef6ea11919a9b34f05bdbd3b444 Mon Sep 17 00:00:00 2001
2 From: Miklos Szeredi <mszeredi@suse.cz>
3 Date: Thu, 30 Aug 2012 16:13:51 +0200
4 Subject: [PATCH 11/13] vfs: export __inode_permission() to modules
5 Patch-mainline: not yet
7 We need to be able to check inode permissions (but not filesystem implied
8 permissions) for stackable filesystems. Expose this interface for overlayfs.
10 Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
12 fs/internal.h | 5 -----
14 include/linux/fs.h | 1 +
15 3 files changed, 2 insertions(+), 5 deletions(-)
19 @@ -42,7 +42,6 @@ static inline int __sync_blockdev(struct
23 -extern int __inode_permission(struct inode *, int);
24 extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
25 extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
26 const char *, unsigned int, struct path *);
29 @@ -402,6 +402,7 @@ int __inode_permission(struct inode *ino
31 return security_inode_permission(inode, mask);
33 +EXPORT_SYMBOL(__inode_permission);
36 * sb_permission - Check superblock-level permissions
37 --- a/include/linux/fs.h
38 +++ b/include/linux/fs.h
39 @@ -2221,6 +2221,7 @@ extern sector_t bmap(struct inode *, sec
41 extern int notify_change(struct dentry *, struct iattr *, struct inode **);
42 extern int inode_permission(struct inode *, int);
43 +extern int __inode_permission(struct inode *, int);
44 extern int generic_permission(struct inode *, int);
46 static inline bool execute_ok(struct inode *inode)