1 Index: linux-2.6.38.2/mm/shmem.c
2 ===================================================================
3 --- linux-2.6.38.2.orig/mm/shmem.c 2011-03-27 20:37:20.000000000 +0200
4 +++ linux-2.6.38.2/mm/shmem.c 2011-03-30 18:44:41.068346925 +0200
5 @@ -2710,6 +2710,16 @@ out:
9 +void shmem_set_file(struct vm_area_struct *vma, struct file *file)
13 + vma->vm_file = file;
14 + vma->vm_ops = &shmem_vm_ops;
15 + vma->vm_flags |= VM_CAN_NONLINEAR;
17 +EXPORT_SYMBOL_GPL(shmem_set_file);
20 * shmem_file_setup - get an unlinked file living in tmpfs
21 * @name: name for dentry (to be seen in /proc/<pid>/maps
22 @@ -2787,10 +2797,7 @@ int shmem_zero_setup(struct vm_area_stru
28 - vma->vm_file = file;
29 - vma->vm_ops = &shmem_vm_ops;
30 - vma->vm_flags |= VM_CAN_NONLINEAR;
31 + shmem_set_file(vma, file);
35 Index: linux-2.6.38.2/fs/file.c
36 ===================================================================
37 --- linux-2.6.38.2.orig/fs/file.c 2011-03-27 20:37:20.000000000 +0200
38 +++ linux-2.6.38.2/fs/file.c 2011-03-28 22:44:57.267151662 +0200
39 @@ -264,6 +264,7 @@ int expand_files(struct files_struct *fi
40 /* All good, so we try */
41 return expand_fdtable(files, nr);
43 +EXPORT_SYMBOL_GPL(expand_files);
45 static int count_open_files(struct fdtable *fdt)
47 Index: linux-2.6.38.2/kernel/exit.c
48 ===================================================================
49 --- linux-2.6.38.2.orig/kernel/exit.c 2011-03-27 20:37:20.000000000 +0200
50 +++ linux-2.6.38.2/kernel/exit.c 2011-03-28 22:44:57.269151650 +0200
51 @@ -513,6 +513,7 @@ struct files_struct *get_files_struct(st
55 +EXPORT_SYMBOL_GPL(get_files_struct);
57 void put_files_struct(struct files_struct *files)
59 @@ -534,6 +535,7 @@ void put_files_struct(struct files_struc
63 +EXPORT_SYMBOL_GPL(put_files_struct);
65 void reset_files_struct(struct files_struct *files)
67 Index: linux-2.6.38.2/kernel/fork.c
68 ===================================================================
69 --- linux-2.6.38.2.orig/kernel/fork.c 2011-03-27 20:37:20.000000000 +0200
70 +++ linux-2.6.38.2/kernel/fork.c 2011-03-28 22:44:57.270151644 +0200
71 @@ -193,6 +193,7 @@ void __put_task_struct(struct task_struc
72 if (!profile_handoff_task(tsk))
75 +EXPORT_SYMBOL_GPL(__put_task_struct);
78 * macro override instead of weak attribute alias, to workaround
79 Index: linux-2.6.38.2/kernel/sched.c
80 ===================================================================
81 --- linux-2.6.38.2.orig/kernel/sched.c 2011-03-27 20:37:20.000000000 +0200
82 +++ linux-2.6.38.2/kernel/sched.c 2011-03-28 22:44:57.274151620 +0200
83 @@ -4641,6 +4641,7 @@ int can_nice(const struct task_struct *p
84 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
85 capable(CAP_SYS_NICE));
87 +EXPORT_SYMBOL_GPL(can_nice);
89 #ifdef __ARCH_WANT_SYS_NICE
91 Index: linux-2.6.38.2/mm/memory.c
92 ===================================================================
93 --- linux-2.6.38.2.orig/mm/memory.c 2011-03-27 20:37:20.000000000 +0200
94 +++ linux-2.6.38.2/mm/memory.c 2011-03-28 22:44:57.277151603 +0200
95 @@ -1229,6 +1229,7 @@ unsigned long zap_page_range(struct vm_a
96 tlb_finish_mmu(tlb, address, end);
99 +EXPORT_SYMBOL_GPL(zap_page_range);
102 * zap_vma_ptes - remove ptes mapping the vma
103 @@ -2692,6 +2693,7 @@ int vmtruncate_range(struct inode *inode
107 +EXPORT_SYMBOL_GPL(vmtruncate_range);
110 * We enter with non-exclusive mmap_sem (to exclude vma changes,
111 Index: linux-2.6.38.2/mm/vmalloc.c
112 ===================================================================
113 --- linux-2.6.38.2.orig/mm/vmalloc.c 2011-03-27 20:37:20.000000000 +0200
114 +++ linux-2.6.38.2/mm/vmalloc.c 2011-03-28 22:44:57.278151598 +0200
115 @@ -1193,6 +1193,7 @@ void unmap_kernel_range(unsigned long ad
116 vunmap_page_range(addr, end);
117 flush_tlb_kernel_range(addr, end);
119 +EXPORT_SYMBOL_GPL(unmap_kernel_range);
121 int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
123 @@ -1308,6 +1309,7 @@ struct vm_struct *get_vm_area(unsigned l
124 return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END,
125 -1, GFP_KERNEL, __builtin_return_address(0));
127 +EXPORT_SYMBOL_GPL(get_vm_area);
129 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
131 Index: linux-2.6.38.2/include/linux/mm.h
132 ===================================================================
133 --- linux-2.6.38.2.orig/include/linux/mm.h 2011-03-27 20:37:20.000000000 +0200
134 +++ linux-2.6.38.2/include/linux/mm.h 2011-03-28 22:44:57.279151592 +0200
135 @@ -863,6 +863,7 @@ extern void show_free_areas(void);
137 int shmem_lock(struct file *file, int lock, struct user_struct *user);
138 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
139 +void shmem_set_file(struct vm_area_struct *vma, struct file *file);
140 int shmem_zero_setup(struct vm_area_struct *);