diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 11:38:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 11:38:04 -0500 |
commit | bf3d846b783327359ddc4bd4f52627b36abb4d1d (patch) | |
tree | c6b8fddbf04a2962dfcf9f487af25033f11b10b9 /include/linux/posix_acl.h | |
parent | 54c0a4b46150db1571d955d598cd342c9f1d9657 (diff) | |
parent | f6500801522c61782d4990fa1ad96154cb397cd4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
"Assorted stuff; the biggest pile here is Christoph's ACL series. Plus
assorted cleanups and fixes all over the place...
There will be another pile later this week"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (43 commits)
__dentry_path() fixes
vfs: Remove second variable named error in __dentry_path
vfs: Is mounted should be testing mnt_ns for NULL or error.
Fix race when checking i_size on direct i/o read
hfsplus: remove can_set_xattr
nfsd: use get_acl and ->set_acl
fs: remove generic_acl
nfs: use generic posix ACL infrastructure for v3 Posix ACLs
gfs2: use generic posix ACL infrastructure
jfs: use generic posix ACL infrastructure
xfs: use generic posix ACL infrastructure
reiserfs: use generic posix ACL infrastructure
ocfs2: use generic posix ACL infrastructure
jffs2: use generic posix ACL infrastructure
hfsplus: use generic posix ACL infrastructure
f2fs: use generic posix ACL infrastructure
ext2/3/4: use generic posix ACL infrastructure
btrfs: use generic posix ACL infrastructure
fs: make posix_acl_create more useful
fs: make posix_acl_chmod more useful
...
Diffstat (limited to 'include/linux/posix_acl.h')
-rw-r--r-- | include/linux/posix_acl.h | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index 833099bf8090..3e96a6a76103 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -85,12 +85,20 @@ extern int posix_acl_valid(const struct posix_acl *); | |||
85 | extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); | 85 | extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); |
86 | extern struct posix_acl *posix_acl_from_mode(umode_t, gfp_t); | 86 | extern struct posix_acl *posix_acl_from_mode(umode_t, gfp_t); |
87 | extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *); | 87 | extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *); |
88 | extern int posix_acl_create(struct posix_acl **, gfp_t, umode_t *); | 88 | extern int __posix_acl_create(struct posix_acl **, gfp_t, umode_t *); |
89 | extern int posix_acl_chmod(struct posix_acl **, gfp_t, umode_t); | 89 | extern int __posix_acl_chmod(struct posix_acl **, gfp_t, umode_t); |
90 | 90 | ||
91 | extern struct posix_acl *get_posix_acl(struct inode *, int); | 91 | extern struct posix_acl *get_posix_acl(struct inode *, int); |
92 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); | 92 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); |
93 | 93 | ||
94 | #ifdef CONFIG_FS_POSIX_ACL | ||
95 | extern int posix_acl_chmod(struct inode *, umode_t); | ||
96 | extern int posix_acl_create(struct inode *, umode_t *, struct posix_acl **, | ||
97 | struct posix_acl **); | ||
98 | |||
99 | extern int simple_set_acl(struct inode *, struct posix_acl *, int); | ||
100 | extern int simple_acl_create(struct inode *, struct inode *); | ||
101 | |||
94 | struct posix_acl **acl_by_type(struct inode *inode, int type); | 102 | struct posix_acl **acl_by_type(struct inode *inode, int type); |
95 | struct posix_acl *get_cached_acl(struct inode *inode, int type); | 103 | struct posix_acl *get_cached_acl(struct inode *inode, int type); |
96 | struct posix_acl *get_cached_acl_rcu(struct inode *inode, int type); | 104 | struct posix_acl *get_cached_acl_rcu(struct inode *inode, int type); |
@@ -100,10 +108,37 @@ void forget_all_cached_acls(struct inode *inode); | |||
100 | 108 | ||
101 | static inline void cache_no_acl(struct inode *inode) | 109 | static inline void cache_no_acl(struct inode *inode) |
102 | { | 110 | { |
103 | #ifdef CONFIG_FS_POSIX_ACL | ||
104 | inode->i_acl = NULL; | 111 | inode->i_acl = NULL; |
105 | inode->i_default_acl = NULL; | 112 | inode->i_default_acl = NULL; |
106 | #endif | ||
107 | } | 113 | } |
114 | #else | ||
115 | static inline int posix_acl_chmod(struct inode *inode, umode_t mode) | ||
116 | { | ||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | #define simple_set_acl NULL | ||
121 | |||
122 | static inline int simple_acl_create(struct inode *dir, struct inode *inode) | ||
123 | { | ||
124 | return 0; | ||
125 | } | ||
126 | static inline void cache_no_acl(struct inode *inode) | ||
127 | { | ||
128 | } | ||
129 | |||
130 | static inline int posix_acl_create(struct inode *inode, umode_t *mode, | ||
131 | struct posix_acl **default_acl, struct posix_acl **acl) | ||
132 | { | ||
133 | *default_acl = *acl = NULL; | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static inline void forget_all_cached_acls(struct inode *inode) | ||
138 | { | ||
139 | } | ||
140 | #endif /* CONFIG_FS_POSIX_ACL */ | ||
141 | |||
142 | struct posix_acl *get_acl(struct inode *inode, int type); | ||
108 | 143 | ||
109 | #endif /* __LINUX_POSIX_ACL_H */ | 144 | #endif /* __LINUX_POSIX_ACL_H */ |