aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2012-08-10 17:40:14 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2012-08-10 17:40:14 +0200
commit9d91c7951a2d0be08cc56e4169c1c4385eeae549 (patch)
tree9a0b5280458a90a4a837809f086a4e5e8388afe5
parent25cd20b82be95b3cf32c39d92145acb7492d68c1 (diff)
downloadvfs-9d91c7951a2d0be08cc56e4169c1c4385eeae549.tar.gz
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>
-rw-r--r--fs/internal.h5
-rw-r--r--fs/namei.c1
-rw-r--r--include/linux/fs.h1
3 files changed, 2 insertions, 5 deletions
diff --git a/fs/internal.h b/fs/internal.h
index 371bcc4..8578209 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -42,11 +42,6 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait)
extern void __init chrdev_init(void);
/*
- * namei.c
- */
-extern int __inode_permission(struct inode *, int);
-
-/*
* namespace.c
*/
extern int copy_mount_options(const void __user *, unsigned long *);
diff --git a/fs/namei.c b/fs/namei.c
index ac2526d..9be439a 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -348,6 +348,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 1265e24..d573703 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2418,6 +2418,7 @@ extern sector_t bmap(struct inode *, sector_t);
#endif
extern int notify_change(struct dentry *, struct iattr *);
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)