3 @@ -2730,6 +2730,16 @@ out:
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;
13 + vma->vm_flags |= VM_CAN_NONLINEAR;
15 +EXPORT_SYMBOL_GPL(shmem_set_file);
18 * shmem_file_setup - get an unlinked file living in tmpfs
19 * @name: name for dentry (to be seen in /proc/<pid>/maps
20 @@ -2807,10 +2817,7 @@ int shmem_zero_setup(struct vm_area_stru
26 - vma->vm_file = file;
27 - vma->vm_ops = &shmem_vm_ops;
28 - vma->vm_flags |= VM_CAN_NONLINEAR;
29 + shmem_set_file(vma, file);
35 @@ -268,6 +268,7 @@ int expand_files(struct files_struct *fi
36 /* All good, so we try */
37 return expand_fdtable(files, nr);
39 +EXPORT_SYMBOL_GPL(expand_files);
41 static int count_open_files(struct fdtable *fdt)
45 @@ -513,6 +513,7 @@ struct files_struct *get_files_struct(st
49 +EXPORT_SYMBOL_GPL(get_files_struct);
51 void put_files_struct(struct files_struct *files)
53 @@ -534,6 +535,7 @@ void put_files_struct(struct files_struc
57 +EXPORT_SYMBOL_GPL(put_files_struct);
59 void reset_files_struct(struct files_struct *files)
63 @@ -193,6 +193,7 @@ void __put_task_struct(struct task_struc
64 if (!profile_handoff_task(tsk))
67 +EXPORT_SYMBOL_GPL(__put_task_struct);
70 * macro override instead of weak attribute alias, to workaround
73 @@ -4641,6 +4641,7 @@ int can_nice(const struct task_struct *p
74 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
75 capable(CAP_SYS_NICE));
77 +EXPORT_SYMBOL_GPL(can_nice);
79 #ifdef __ARCH_WANT_SYS_NICE
83 @@ -1229,6 +1229,7 @@ unsigned long zap_page_range(struct vm_a
84 tlb_finish_mmu(tlb, address, end);
87 +EXPORT_SYMBOL_GPL(zap_page_range);
90 * zap_vma_ptes - remove ptes mapping the vma
91 @@ -2699,6 +2700,7 @@ int vmtruncate_range(struct inode *inode
95 +EXPORT_SYMBOL_GPL(vmtruncate_range);
98 * We enter with non-exclusive mmap_sem (to exclude vma changes,
101 @@ -1193,6 +1193,7 @@ void unmap_kernel_range(unsigned long ad
102 vunmap_page_range(addr, end);
103 flush_tlb_kernel_range(addr, end);
105 +EXPORT_SYMBOL_GPL(unmap_kernel_range);
107 int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
109 @@ -1308,6 +1309,7 @@ struct vm_struct *get_vm_area(unsigned l
110 return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END,
111 -1, GFP_KERNEL, __builtin_return_address(0));
113 +EXPORT_SYMBOL_GPL(get_vm_area);
115 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
117 --- a/include/linux/mm.h
118 +++ b/include/linux/mm.h
119 @@ -864,6 +864,7 @@ extern void show_free_areas(void);
121 int shmem_lock(struct file *file, int lock, struct user_struct *user);
122 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
123 +void shmem_set_file(struct vm_area_struct *vma, struct file *file);
124 int shmem_zero_setup(struct vm_area_struct *);