Skip to content

Commit

Permalink
vfs: export __inode_permission() to modules
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Szeredi committed Oct 23, 2014
1 parent 1c11859 commit bd5d085
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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 *);
Expand Down
1 change: 1 addition & 0 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,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
Expand Down
1 change: 1 addition & 0 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,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)
Expand Down

0 comments on commit bd5d085

Please sign in to comment.