Root/target/linux/generic/patches-2.6.31/980-vm_exports.patch

1--- a/mm/shmem.c
2+++ b/mm/shmem.c
3@@ -2602,6 +2602,16 @@ int shmem_unuse(swp_entry_t entry, struc
4 
5 /* common code */
6 
7+void shmem_set_file(struct vm_area_struct *vma, struct file *file)
8+{
9+ ima_counts_get(file);
10+ if (vma->vm_file)
11+ fput(vma->vm_file);
12+ vma->vm_file = file;
13+ vma->vm_ops = &shmem_vm_ops;
14+}
15+EXPORT_SYMBOL_GPL(shmem_set_file);
16+
17 /**
18  * shmem_file_setup - get an unlinked file living in tmpfs
19  * @name: name for dentry (to be seen in /proc/<pid>/maps
20@@ -2681,10 +2691,7 @@ int shmem_zero_setup(struct vm_area_stru
21     if (IS_ERR(file))
22         return PTR_ERR(file);
23 
24- if (vma->vm_file)
25- fput(vma->vm_file);
26- vma->vm_file = file;
27- vma->vm_ops = &shmem_vm_ops;
28+ shmem_set_file(vma, file);
29     return 0;
30 }
31 
32--- a/fs/file.c
33+++ b/fs/file.c
34@@ -270,6 +270,7 @@ int expand_files(struct files_struct *fi
35     /* All good, so we try */
36     return expand_fdtable(files, nr);
37 }
38+EXPORT_SYMBOL_GPL(expand_files);
39 
40 static int count_open_files(struct fdtable *fdt)
41 {
42--- a/kernel/exit.c
43+++ b/kernel/exit.c
44@@ -507,6 +507,7 @@ struct files_struct *get_files_struct(st
45 
46     return files;
47 }
48+EXPORT_SYMBOL_GPL(get_files_struct);
49 
50 void put_files_struct(struct files_struct *files)
51 {
52@@ -526,6 +527,7 @@ void put_files_struct(struct files_struc
53         free_fdtable(fdt);
54     }
55 }
56+EXPORT_SYMBOL_GPL(put_files_struct);
57 
58 void reset_files_struct(struct files_struct *files)
59 {
60--- a/kernel/fork.c
61+++ b/kernel/fork.c
62@@ -159,6 +159,7 @@ void __put_task_struct(struct task_struc
63     if (!profile_handoff_task(tsk))
64         free_task(tsk);
65 }
66+EXPORT_SYMBOL_GPL(__put_task_struct);
67 
68 /*
69  * macro override instead of weak attribute alias, to workaround
70--- a/kernel/sched.c
71+++ b/kernel/sched.c
72@@ -5981,6 +5981,7 @@ int can_nice(const struct task_struct *p
73     return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
74         capable(CAP_SYS_NICE));
75 }
76+EXPORT_SYMBOL_GPL(can_nice);
77 
78 #ifdef __ARCH_WANT_SYS_NICE
79 
80--- a/mm/memory.c
81+++ b/mm/memory.c
82@@ -1064,6 +1064,7 @@ unsigned long zap_page_range(struct vm_a
83         tlb_finish_mmu(tlb, address, end);
84     return end;
85 }
86+EXPORT_SYMBOL_GPL(zap_page_range);
87 
88 /**
89  * zap_vma_ptes - remove ptes mapping the vma
90@@ -2490,6 +2491,7 @@ int vmtruncate_range(struct inode *inode
91 
92     return 0;
93 }
94+EXPORT_SYMBOL_GPL(vmtruncate_range);
95 
96 /*
97  * We enter with non-exclusive mmap_sem (to exclude vma changes,
98--- a/mm/vmalloc.c
99+++ b/mm/vmalloc.c
100@@ -1101,6 +1101,7 @@ void unmap_kernel_range(unsigned long ad
101     vunmap_page_range(addr, end);
102     flush_tlb_kernel_range(addr, end);
103 }
104+EXPORT_SYMBOL_GPL(unmap_kernel_range);
105 
106 int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
107 {
108@@ -1214,6 +1215,7 @@ struct vm_struct *get_vm_area(unsigned l
109     return __get_vm_area_node(size, flags, VMALLOC_START, VMALLOC_END,
110                 -1, GFP_KERNEL, __builtin_return_address(0));
111 }
112+EXPORT_SYMBOL_GPL(get_vm_area);
113 
114 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
115                 void *caller)
116--- a/include/linux/mm.h
117+++ b/include/linux/mm.h
118@@ -711,6 +711,7 @@ static inline int shmem_lock(struct file
119 #endif
120 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
121 
122+void shmem_set_file(struct vm_area_struct *vma, struct file *file);
123 int shmem_zero_setup(struct vm_area_struct *);
124 
125 #ifndef CONFIG_MMU
126--- a/kernel/signal.c
127+++ b/kernel/signal.c
128@@ -1062,6 +1062,7 @@ struct sighand_struct *lock_task_sighand
129 
130     return sighand;
131 }
132+EXPORT_SYMBOL(lock_task_sighand);
133 
134 /*
135  * send signal info to all the members of a group
136

Archive Download this file



interactive