3 @@ -3377,6 +3377,15 @@ put_path:
7 +void shmem_set_file(struct vm_area_struct *vma, struct file *file)
11 + vma->vm_file = file;
12 + vma->vm_ops = &shmem_vm_ops;
14 +EXPORT_SYMBOL_GPL(shmem_set_file);
17 * shmem_kernel_file_setup - get an unlinked file living in tmpfs which must be
18 * kernel internal. There will be NO LSM permission checks against the
19 @@ -3416,11 +3425,8 @@ int shmem_zero_setup(struct vm_area_stru
20 file = shmem_file_setup("dev/zero", size, vma->vm_flags);
23 + shmem_set_file(vma, file);
27 - vma->vm_file = file;
28 - vma->vm_ops = &shmem_vm_ops;
34 @@ -216,6 +216,7 @@ static inline void __set_open_fd(int fd,
36 __set_bit(fd, fdt->open_fds);
38 +EXPORT_SYMBOL_GPL(expand_files);
40 static inline void __clear_open_fd(int fd, struct fdtable *fdt)
44 @@ -461,6 +461,8 @@ static void exit_mm(struct task_struct *
46 clear_thread_flag(TIF_MEMDIE);
48 +EXPORT_SYMBOL_GPL(get_files_struct);
49 +EXPORT_SYMBOL_GPL(put_files_struct);
52 * When we die, we re-parent all our children, and try to:
53 --- a/kernel/sched/core.c
54 +++ b/kernel/sched/core.c
55 @@ -3147,6 +3147,7 @@ int can_nice(const struct task_struct *p
56 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
57 capable(CAP_SYS_NICE));
59 +EXPORT_SYMBOL_GPL(can_nice);
61 #ifdef __ARCH_WANT_SYS_NICE
65 @@ -1403,6 +1403,7 @@ void zap_page_range(struct vm_area_struc
66 mmu_notifier_invalidate_range_end(mm, start, end);
67 tlb_finish_mmu(&tlb, start, end);
69 +EXPORT_SYMBOL_GPL(zap_page_range);
72 * zap_page_range_single - remove user pages in a given range
75 @@ -1372,6 +1372,7 @@ struct vm_struct *get_vm_area(unsigned l
76 NUMA_NO_NODE, GFP_KERNEL,
77 __builtin_return_address(0));
79 +EXPORT_SYMBOL_GPL(get_vm_area);
81 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
83 --- a/include/linux/shmem_fs.h
84 +++ b/include/linux/shmem_fs.h
85 @@ -49,6 +49,8 @@ extern int shmem_init(void);
86 extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
87 extern struct file *shmem_file_setup(const char *name,
88 loff_t size, unsigned long flags);
90 +extern void shmem_set_file(struct vm_area_struct *vma, struct file *file);
91 extern struct file *shmem_kernel_file_setup(const char *name, loff_t size,
93 extern int shmem_zero_setup(struct vm_area_struct *);