aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/file.h8
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/generic_acl.h41
-rw-r--r--include/linux/ima.h12
-rw-r--r--include/linux/mnt_namespace.h1
-rw-r--r--include/linux/shmem_fs.h16
-rw-r--r--include/linux/xattr.h13
7 files changed, 22 insertions, 70 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index 335a0a5c316e..5555508fd517 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -18,11 +18,9 @@ extern void drop_file_write_access(struct file *file);
18struct file_operations; 18struct file_operations;
19struct vfsmount; 19struct vfsmount;
20struct dentry; 20struct dentry;
21extern int init_file(struct file *, struct vfsmount *mnt, 21struct path;
22 struct dentry *dentry, fmode_t mode, 22extern struct file *alloc_file(struct path *, fmode_t mode,
23 const struct file_operations *fop); 23 const struct file_operations *fop);
24extern struct file *alloc_file(struct vfsmount *, struct dentry *dentry,
25 fmode_t mode, const struct file_operations *fop);
26 24
27static inline void fput_light(struct file *file, int fput_needed) 25static inline void fput_light(struct file *file, int fput_needed)
28{ 26{
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b23a7018eb90..7c8ff12d1995 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2189,7 +2189,6 @@ static inline void insert_inode_hash(struct inode *inode) {
2189 __insert_inode_hash(inode, inode->i_ino); 2189 __insert_inode_hash(inode, inode->i_ino);
2190} 2190}
2191 2191
2192extern struct file * get_empty_filp(void);
2193extern void file_move(struct file *f, struct list_head *list); 2192extern void file_move(struct file *f, struct list_head *list);
2194extern void file_kill(struct file *f); 2193extern void file_kill(struct file *f);
2195#ifdef CONFIG_BLOCK 2194#ifdef CONFIG_BLOCK
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h
index 886f5faa08cb..ca666d18ed67 100644
--- a/include/linux/generic_acl.h
+++ b/include/linux/generic_acl.h
@@ -1,36 +1,15 @@
1/* 1#ifndef LINUX_GENERIC_ACL_H
2 * include/linux/generic_acl.h 2#define LINUX_GENERIC_ACL_H
3 *
4 * (C) 2005 Andreas Gruenbacher <agruen@suse.de>
5 *
6 * This file is released under the GPL.
7 */
8 3
9#ifndef GENERIC_ACL_H 4#include <linux/xattr.h>
10#define GENERIC_ACL_H
11 5
12#include <linux/posix_acl.h> 6struct inode;
13#include <linux/posix_acl_xattr.h>
14 7
15/** 8extern struct xattr_handler generic_acl_access_handler;
16 * struct generic_acl_operations - filesystem operations 9extern struct xattr_handler generic_acl_default_handler;
17 *
18 * Filesystems must make these operations available to the generic
19 * operations.
20 */
21struct generic_acl_operations {
22 struct posix_acl *(*getacl)(struct inode *, int);
23 void (*setacl)(struct inode *, int, struct posix_acl *);
24};
25 10
26size_t generic_acl_list(struct inode *, struct generic_acl_operations *, int, 11int generic_acl_init(struct inode *, struct inode *);
27 char *, size_t); 12int generic_acl_chmod(struct inode *);
28int generic_acl_get(struct inode *, struct generic_acl_operations *, int, 13int generic_check_acl(struct inode *inode, int mask);
29 void *, size_t);
30int generic_acl_set(struct inode *, struct generic_acl_operations *, int,
31 const void *, size_t);
32int generic_acl_init(struct inode *, struct inode *,
33 struct generic_acl_operations *);
34int generic_acl_chmod(struct inode *, struct generic_acl_operations *);
35 14
36#endif 15#endif /* LINUX_GENERIC_ACL_H */
diff --git a/include/linux/ima.h b/include/linux/ima.h
index 0e3f2a4c25f6..99dc6d5cf7e5 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -13,18 +13,14 @@
13#include <linux/fs.h> 13#include <linux/fs.h>
14struct linux_binprm; 14struct linux_binprm;
15 15
16#define IMA_COUNT_UPDATE 1
17#define IMA_COUNT_LEAVE 0
18
19#ifdef CONFIG_IMA 16#ifdef CONFIG_IMA
20extern int ima_bprm_check(struct linux_binprm *bprm); 17extern int ima_bprm_check(struct linux_binprm *bprm);
21extern int ima_inode_alloc(struct inode *inode); 18extern int ima_inode_alloc(struct inode *inode);
22extern void ima_inode_free(struct inode *inode); 19extern void ima_inode_free(struct inode *inode);
23extern int ima_path_check(struct path *path, int mask, int update_counts); 20extern int ima_path_check(struct path *path, int mask);
24extern void ima_file_free(struct file *file); 21extern void ima_file_free(struct file *file);
25extern int ima_file_mmap(struct file *file, unsigned long prot); 22extern int ima_file_mmap(struct file *file, unsigned long prot);
26extern void ima_counts_get(struct file *file); 23extern void ima_counts_get(struct file *file);
27extern void ima_counts_put(struct path *path, int mask);
28 24
29#else 25#else
30static inline int ima_bprm_check(struct linux_binprm *bprm) 26static inline int ima_bprm_check(struct linux_binprm *bprm)
@@ -42,7 +38,7 @@ static inline void ima_inode_free(struct inode *inode)
42 return; 38 return;
43} 39}
44 40
45static inline int ima_path_check(struct path *path, int mask, int update_counts) 41static inline int ima_path_check(struct path *path, int mask)
46{ 42{
47 return 0; 43 return 0;
48} 44}
@@ -62,9 +58,5 @@ static inline void ima_counts_get(struct file *file)
62 return; 58 return;
63} 59}
64 60
65static inline void ima_counts_put(struct path *path, int mask)
66{
67 return;
68}
69#endif /* CONFIG_IMA_H */ 61#endif /* CONFIG_IMA_H */
70#endif /* _LINUX_IMA_H */ 62#endif /* _LINUX_IMA_H */
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index d74785c2393a..d9ebf1037dfa 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -23,7 +23,6 @@ struct proc_mounts {
23 23
24struct fs_struct; 24struct fs_struct;
25 25
26extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt);
27extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, 26extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
28 struct fs_struct *); 27 struct fs_struct *);
29extern void put_mnt_ns(struct mnt_namespace *ns); 28extern void put_mnt_ns(struct mnt_namespace *ns);
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index deee7afd8d66..e164291fb3e7 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -41,20 +41,4 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode)
41extern int init_tmpfs(void); 41extern int init_tmpfs(void);
42extern int shmem_fill_super(struct super_block *sb, void *data, int silent); 42extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
43 43
44#ifdef CONFIG_TMPFS_POSIX_ACL
45int shmem_check_acl(struct inode *, int);
46int shmem_acl_init(struct inode *, struct inode *);
47
48extern struct xattr_handler shmem_xattr_acl_access_handler;
49extern struct xattr_handler shmem_xattr_acl_default_handler;
50
51extern struct generic_acl_operations shmem_acl_ops;
52
53#else
54static inline int shmem_acl_init(struct inode *inode, struct inode *dir)
55{
56 return 0;
57}
58#endif /* CONFIG_TMPFS_POSIX_ACL */
59
60#endif 44#endif
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index 5c84af8c5f6f..fb9b7e6e1e2d 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -38,12 +38,13 @@ struct dentry;
38 38
39struct xattr_handler { 39struct xattr_handler {
40 char *prefix; 40 char *prefix;
41 size_t (*list)(struct inode *inode, char *list, size_t list_size, 41 int flags; /* fs private flags passed back to the handlers */
42 const char *name, size_t name_len); 42 size_t (*list)(struct dentry *dentry, char *list, size_t list_size,
43 int (*get)(struct inode *inode, const char *name, void *buffer, 43 const char *name, size_t name_len, int handler_flags);
44 size_t size); 44 int (*get)(struct dentry *dentry, const char *name, void *buffer,
45 int (*set)(struct inode *inode, const char *name, const void *buffer, 45 size_t size, int handler_flags);
46 size_t size, int flags); 46 int (*set)(struct dentry *dentry, const char *name, const void *buffer,
47 size_t size, int flags, int handler_flags);
47}; 48};
48 49
49ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); 50ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);