]> git.pld-linux.org Git - packages/kernel.git/blame - ovl03-vfs-export-inode_permission-to-modules.patch
- 3.14.32
[packages/kernel.git] / ovl03-vfs-export-inode_permission-to-modules.patch
CommitLineData
68184a5a
JR
1From 04a60da13369fef6ea11919a9b34f05bdbd3b444 Mon Sep 17 00:00:00 2001
2From: Miklos Szeredi <mszeredi@suse.cz>
3Date: Thu, 30 Aug 2012 16:13:51 +0200
4Subject: [PATCH 11/13] vfs: export __inode_permission() to modules
5Patch-mainline: not yet
6
7We need to be able to check inode permissions (but not filesystem implied
8permissions) for stackable filesystems. Expose this interface for overlayfs.
9
10Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
11---
12 fs/internal.h | 5 -----
13 fs/namei.c | 1 +
14 include/linux/fs.h | 1 +
15 3 files changed, 2 insertions(+), 5 deletions(-)
16
c06a8ce3
AM
17--- a/fs/internal.h
18+++ b/fs/internal.h
392086de 19@@ -42,7 +42,6 @@ static inline int __sync_blockdev(struct
68184a5a 20 /*
392086de 21 * namei.c
68184a5a 22 */
392086de
AM
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 *);
c06a8ce3
AM
27--- a/fs/namei.c
28+++ b/fs/namei.c
29@@ -402,6 +402,7 @@ int __inode_permission(struct inode *ino
68184a5a
JR
30
31 return security_inode_permission(inode, mask);
32 }
33+EXPORT_SYMBOL(__inode_permission);
34
35 /**
36 * sb_permission - Check superblock-level permissions
c06a8ce3
AM
37--- a/include/linux/fs.h
38+++ b/include/linux/fs.h
39@@ -2221,6 +2221,7 @@ extern sector_t bmap(struct inode *, sec
68184a5a 40 #endif
a25ec4e9 41 extern int notify_change(struct dentry *, struct iattr *, struct inode **);
68184a5a
JR
42 extern int inode_permission(struct inode *, int);
43+extern int __inode_permission(struct inode *, int);
44 extern int generic_permission(struct inode *, int);
45
46 static inline bool execute_ok(struct inode *inode)
This page took 0.875348 seconds and 4 git commands to generate.