ar8216: support AR8316 rev 0 devices
[openwrt.git] / target / linux / generic / patches-2.6.32 / 980-vm_exports.patch
1 --- a/mm/shmem.c
2 +++ b/mm/shmem.c
3 @@ -2608,6 +2608,16 @@ int shmem_lock(struct file *file, int lo
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 @@ -2687,9 +2697,6 @@ 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 --- a/fs/file.c
32 +++ b/fs/file.c
33 @@ -271,6 +271,7 @@ int expand_files(struct files_struct *fi
34 /* All good, so we try */
35 return expand_fdtable(files, nr);
36 }
37 +EXPORT_SYMBOL_GPL(expand_files);
38
39 static int count_open_files(struct fdtable *fdt)
40 {
41 --- a/kernel/exit.c
42 +++ b/kernel/exit.c
43 @@ -514,6 +514,7 @@ struct files_struct *get_files_struct(st
44
45 return files;
46 }
47 +EXPORT_SYMBOL_GPL(get_files_struct);
48
49 void put_files_struct(struct files_struct *files)
50 {
51 @@ -533,6 +534,7 @@ void put_files_struct(struct files_struc
52 free_fdtable(fdt);
53 }
54 }
55 +EXPORT_SYMBOL_GPL(put_files_struct);
56
57 void reset_files_struct(struct files_struct *files)
58 {
59 --- a/kernel/fork.c
60 +++ b/kernel/fork.c
61 @@ -168,6 +168,7 @@ void __put_task_struct(struct task_struc
62 if (!profile_handoff_task(tsk))
63 free_task(tsk);
64 }
65 +EXPORT_SYMBOL_GPL(__put_task_struct);
66
67 /*
68 * macro override instead of weak attribute alias, to workaround
69 --- a/kernel/sched.c
70 +++ b/kernel/sched.c
71 @@ -6362,6 +6362,7 @@ int can_nice(const struct task_struct *p
72 return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
73 capable(CAP_SYS_NICE));
74 }
75 +EXPORT_SYMBOL_GPL(can_nice);
76
77 #ifdef __ARCH_WANT_SYS_NICE
78
79 --- a/mm/memory.c
80 +++ b/mm/memory.c
81 @@ -1100,6 +1100,7 @@ unsigned long zap_page_range(struct vm_a
82 tlb_finish_mmu(tlb, address, end);
83 return end;
84 }
85 +EXPORT_SYMBOL_GPL(zap_page_range);
86
87 /**
88 * zap_vma_ptes - remove ptes mapping the vma
89 @@ -2496,6 +2497,7 @@ int vmtruncate_range(struct inode *inode
90
91 return 0;
92 }
93 +EXPORT_SYMBOL_GPL(vmtruncate_range);
94
95 /*
96 * We enter with non-exclusive mmap_sem (to exclude vma changes,
97 --- a/mm/vmalloc.c
98 +++ b/mm/vmalloc.c
99 @@ -1181,6 +1181,7 @@ void unmap_kernel_range(unsigned long ad
100 vunmap_page_range(addr, end);
101 flush_tlb_kernel_range(addr, end);
102 }
103 +EXPORT_SYMBOL_GPL(unmap_kernel_range);
104
105 int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
106 {
107 @@ -1296,6 +1297,7 @@ struct vm_struct *get_vm_area(unsigned l
108 return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END,
109 -1, GFP_KERNEL, __builtin_return_address(0));
110 }
111 +EXPORT_SYMBOL_GPL(get_vm_area);
112
113 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
114 void *caller)
115 --- a/include/linux/mm.h
116 +++ b/include/linux/mm.h
117 @@ -717,6 +717,7 @@ extern void show_free_areas(void);
118
119 int shmem_lock(struct file *file, int lock, struct user_struct *user);
120 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
121 +void shmem_set_file(struct vm_area_struct *vma, struct file *file);
122 int shmem_zero_setup(struct vm_area_struct *);
123
124 #ifndef CONFIG_MMU
125 --- a/kernel/signal.c
126 +++ b/kernel/signal.c
127 @@ -1072,6 +1072,7 @@ struct sighand_struct *lock_task_sighand
128
129 return sighand;
130 }
131 +EXPORT_SYMBOL(lock_task_sighand);
132
133 /*
134 * send signal info to all the members of a group
This page took 0.047445 seconds and 5 git commands to generate.