diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/binfmts.h | 1 | ||||
-rw-r--r-- | include/linux/dcache.h | 8 | ||||
-rw-r--r-- | include/linux/elf.h | 4 | ||||
-rw-r--r-- | include/linux/fs.h | 14 | ||||
-rw-r--r-- | include/linux/fsnotify.h | 2 | ||||
-rw-r--r-- | include/linux/hugetlb.h | 2 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 2 |
7 files changed, 21 insertions, 12 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 0530b9860359..c3a09149f793 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -111,7 +111,6 @@ extern int suid_dumpable; | |||
111 | extern int setup_arg_pages(struct linux_binprm * bprm, | 111 | extern int setup_arg_pages(struct linux_binprm * bprm, |
112 | unsigned long stack_top, | 112 | unsigned long stack_top, |
113 | int executable_stack); | 113 | int executable_stack); |
114 | extern int bprm_mm_init(struct linux_binprm *bprm); | ||
115 | extern int bprm_change_interp(char *interp, struct linux_binprm *bprm); | 114 | extern int bprm_change_interp(char *interp, struct linux_binprm *bprm); |
116 | extern int copy_strings_kernel(int argc, const char *const *argv, | 115 | extern int copy_strings_kernel(int argc, const char *const *argv, |
117 | struct linux_binprm *bprm); | 116 | struct linux_binprm *bprm); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index c1754b59ddd3..1a6bb81f0fe5 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -145,6 +145,7 @@ enum dentry_d_lock_class | |||
145 | 145 | ||
146 | struct dentry_operations { | 146 | struct dentry_operations { |
147 | int (*d_revalidate)(struct dentry *, unsigned int); | 147 | int (*d_revalidate)(struct dentry *, unsigned int); |
148 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | ||
148 | int (*d_hash)(const struct dentry *, const struct inode *, | 149 | int (*d_hash)(const struct dentry *, const struct inode *, |
149 | struct qstr *); | 150 | struct qstr *); |
150 | int (*d_compare)(const struct dentry *, const struct inode *, | 151 | int (*d_compare)(const struct dentry *, const struct inode *, |
@@ -192,6 +193,8 @@ struct dentry_operations { | |||
192 | #define DCACHE_GENOCIDE 0x0200 | 193 | #define DCACHE_GENOCIDE 0x0200 |
193 | #define DCACHE_SHRINK_LIST 0x0400 | 194 | #define DCACHE_SHRINK_LIST 0x0400 |
194 | 195 | ||
196 | #define DCACHE_OP_WEAK_REVALIDATE 0x0800 | ||
197 | |||
195 | #define DCACHE_NFSFS_RENAMED 0x1000 | 198 | #define DCACHE_NFSFS_RENAMED 0x1000 |
196 | /* this dentry has been "silly renamed" and has to be deleted on the last | 199 | /* this dentry has been "silly renamed" and has to be deleted on the last |
197 | * dput() */ | 200 | * dput() */ |
@@ -293,9 +296,9 @@ extern void d_move(struct dentry *, struct dentry *); | |||
293 | extern struct dentry *d_ancestor(struct dentry *, struct dentry *); | 296 | extern struct dentry *d_ancestor(struct dentry *, struct dentry *); |
294 | 297 | ||
295 | /* appendix may either be NULL or be used for transname suffixes */ | 298 | /* appendix may either be NULL or be used for transname suffixes */ |
296 | extern struct dentry *d_lookup(struct dentry *, struct qstr *); | 299 | extern struct dentry *d_lookup(const struct dentry *, const struct qstr *); |
297 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); | 300 | extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); |
298 | extern struct dentry *__d_lookup(struct dentry *, struct qstr *); | 301 | extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *); |
299 | extern struct dentry *__d_lookup_rcu(const struct dentry *parent, | 302 | extern struct dentry *__d_lookup_rcu(const struct dentry *parent, |
300 | const struct qstr *name, | 303 | const struct qstr *name, |
301 | unsigned *seq, struct inode *inode); | 304 | unsigned *seq, struct inode *inode); |
@@ -333,7 +336,6 @@ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | |||
333 | extern char *__d_path(const struct path *, const struct path *, char *, int); | 336 | extern char *__d_path(const struct path *, const struct path *, char *, int); |
334 | extern char *d_absolute_path(const struct path *, char *, int); | 337 | extern char *d_absolute_path(const struct path *, char *, int); |
335 | extern char *d_path(const struct path *, char *, int); | 338 | extern char *d_path(const struct path *, char *, int); |
336 | extern char *d_path_with_unreachable(const struct path *, char *, int); | ||
337 | extern char *dentry_path_raw(struct dentry *, char *, int); | 339 | extern char *dentry_path_raw(struct dentry *, char *, int); |
338 | extern char *dentry_path(struct dentry *, char *, int); | 340 | extern char *dentry_path(struct dentry *, char *, int); |
339 | 341 | ||
diff --git a/include/linux/elf.h b/include/linux/elf.h index 8c9048e33463..40a3c0e01b2b 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -10,6 +10,10 @@ | |||
10 | Override in asm/elf.h as needed. */ | 10 | Override in asm/elf.h as needed. */ |
11 | # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 | 11 | # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 |
12 | #endif | 12 | #endif |
13 | #ifndef SET_PERSONALITY | ||
14 | #define SET_PERSONALITY(ex) \ | ||
15 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
16 | #endif | ||
13 | 17 | ||
14 | #if ELF_CLASS == ELFCLASS32 | 18 | #if ELF_CLASS == ELFCLASS32 |
15 | 19 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7d2e893ec3d1..4e686a099465 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -769,7 +769,6 @@ struct file { | |||
769 | } f_u; | 769 | } f_u; |
770 | struct path f_path; | 770 | struct path f_path; |
771 | #define f_dentry f_path.dentry | 771 | #define f_dentry f_path.dentry |
772 | #define f_vfsmnt f_path.mnt | ||
773 | const struct file_operations *f_op; | 772 | const struct file_operations *f_op; |
774 | 773 | ||
775 | /* | 774 | /* |
@@ -1807,7 +1806,6 @@ struct file_system_type { | |||
1807 | #define FS_HAS_SUBTYPE 4 | 1806 | #define FS_HAS_SUBTYPE 4 |
1808 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ | 1807 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ |
1809 | #define FS_USERNS_DEV_MOUNT 16 /* A userns mount does not imply MNT_NODEV */ | 1808 | #define FS_USERNS_DEV_MOUNT 16 /* A userns mount does not imply MNT_NODEV */ |
1810 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | ||
1811 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ | 1809 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ |
1812 | struct dentry *(*mount) (struct file_system_type *, int, | 1810 | struct dentry *(*mount) (struct file_system_type *, int, |
1813 | const char *, void *); | 1811 | const char *, void *); |
@@ -2217,6 +2215,11 @@ static inline bool execute_ok(struct inode *inode) | |||
2217 | return (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode); | 2215 | return (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode); |
2218 | } | 2216 | } |
2219 | 2217 | ||
2218 | static inline struct inode *file_inode(struct file *f) | ||
2219 | { | ||
2220 | return f->f_path.dentry->d_inode; | ||
2221 | } | ||
2222 | |||
2220 | /* | 2223 | /* |
2221 | * get_write_access() gets write permission for a file. | 2224 | * get_write_access() gets write permission for a file. |
2222 | * put_write_access() releases this write permission. | 2225 | * put_write_access() releases this write permission. |
@@ -2239,7 +2242,7 @@ static inline int get_write_access(struct inode *inode) | |||
2239 | } | 2242 | } |
2240 | static inline int deny_write_access(struct file *file) | 2243 | static inline int deny_write_access(struct file *file) |
2241 | { | 2244 | { |
2242 | struct inode *inode = file->f_path.dentry->d_inode; | 2245 | struct inode *inode = file_inode(file); |
2243 | return atomic_dec_unless_positive(&inode->i_writecount) ? 0 : -ETXTBSY; | 2246 | return atomic_dec_unless_positive(&inode->i_writecount) ? 0 : -ETXTBSY; |
2244 | } | 2247 | } |
2245 | static inline void put_write_access(struct inode * inode) | 2248 | static inline void put_write_access(struct inode * inode) |
@@ -2249,7 +2252,7 @@ static inline void put_write_access(struct inode * inode) | |||
2249 | static inline void allow_write_access(struct file *file) | 2252 | static inline void allow_write_access(struct file *file) |
2250 | { | 2253 | { |
2251 | if (file) | 2254 | if (file) |
2252 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); | 2255 | atomic_inc(&file_inode(file)->i_writecount); |
2253 | } | 2256 | } |
2254 | #ifdef CONFIG_IMA | 2257 | #ifdef CONFIG_IMA |
2255 | static inline void i_readcount_dec(struct inode *inode) | 2258 | static inline void i_readcount_dec(struct inode *inode) |
@@ -2274,6 +2277,7 @@ static inline void i_readcount_inc(struct inode *inode) | |||
2274 | extern int do_pipe_flags(int *, int); | 2277 | extern int do_pipe_flags(int *, int); |
2275 | 2278 | ||
2276 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2279 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2280 | extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t); | ||
2277 | extern struct file * open_exec(const char *); | 2281 | extern struct file * open_exec(const char *); |
2278 | 2282 | ||
2279 | /* fs/dcache.c -- generic fs support functions */ | 2283 | /* fs/dcache.c -- generic fs support functions */ |
@@ -2463,7 +2467,7 @@ extern int page_symlink(struct inode *inode, const char *symname, int len); | |||
2463 | extern const struct inode_operations page_symlink_inode_operations; | 2467 | extern const struct inode_operations page_symlink_inode_operations; |
2464 | extern int generic_readlink(struct dentry *, char __user *, int); | 2468 | extern int generic_readlink(struct dentry *, char __user *, int); |
2465 | extern void generic_fillattr(struct inode *, struct kstat *); | 2469 | extern void generic_fillattr(struct inode *, struct kstat *); |
2466 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 2470 | extern int vfs_getattr(struct path *, struct kstat *); |
2467 | void __inode_add_bytes(struct inode *inode, loff_t bytes); | 2471 | void __inode_add_bytes(struct inode *inode, loff_t bytes); |
2468 | void inode_add_bytes(struct inode *inode, loff_t bytes); | 2472 | void inode_add_bytes(struct inode *inode, loff_t bytes); |
2469 | void inode_sub_bytes(struct inode *inode, loff_t bytes); | 2473 | void inode_sub_bytes(struct inode *inode, loff_t bytes); |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 0fbfb4646d1b..a78680a92dba 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -244,7 +244,7 @@ static inline void fsnotify_open(struct file *file) | |||
244 | static inline void fsnotify_close(struct file *file) | 244 | static inline void fsnotify_close(struct file *file) |
245 | { | 245 | { |
246 | struct path *path = &file->f_path; | 246 | struct path *path = &file->f_path; |
247 | struct inode *inode = file->f_path.dentry->d_inode; | 247 | struct inode *inode = file_inode(file); |
248 | fmode_t mode = file->f_mode; | 248 | fmode_t mode = file->f_mode; |
249 | __u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE; | 249 | __u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE; |
250 | 250 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index eedc334fb6f5..16e4e9a643fb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -281,7 +281,7 @@ static inline struct hstate *hstate_inode(struct inode *i) | |||
281 | 281 | ||
282 | static inline struct hstate *hstate_file(struct file *f) | 282 | static inline struct hstate *hstate_file(struct file *f) |
283 | { | 283 | { |
284 | return hstate_inode(f->f_dentry->d_inode); | 284 | return hstate_inode(file_inode(f)); |
285 | } | 285 | } |
286 | 286 | ||
287 | static inline struct hstate *hstate_vma(struct vm_area_struct *vma) | 287 | static inline struct hstate *hstate_vma(struct vm_area_struct *vma) |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index f5a051a79273..0e62d84f9f7f 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -291,7 +291,7 @@ int nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr); | |||
291 | 291 | ||
292 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) | 292 | static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) |
293 | { | 293 | { |
294 | return file->f_file->f_path.dentry->d_inode; | 294 | return file_inode(file->f_file); |
295 | } | 295 | } |
296 | 296 | ||
297 | static inline int __nlm_privileged_request4(const struct sockaddr *sap) | 297 | static inline int __nlm_privileged_request4(const struct sockaddr *sap) |