[kernel] Fix gpio_spi_old module for 2.6.35
[openwrt.git] / target / linux / generic / patches-2.6.30 / 980-vm_exports.patch
1 --- a/mm/shmem.c
2 +++ b/mm/shmem.c
3 @@ -2606,6 +2606,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_shm_check(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 @@ -2684,11 +2694,7 @@ int shmem_zero_setup(struct vm_area_stru
21 if (IS_ERR(file))
22 return PTR_ERR(file);
23
24 - ima_shm_check(file);
25 - if (vma->vm_file)
26 - fput(vma->vm_file);
27 - vma->vm_file = file;
28 - vma->vm_ops = &shmem_vm_ops;
29 + shmem_set_file(vma, file);
30 return 0;
31 }
32
33 --- a/fs/file.c
34 +++ b/fs/file.c
35 @@ -270,6 +270,7 @@ int expand_files(struct files_struct *fi
36 /* All good, so we try */
37 return expand_fdtable(files, nr);
38 }
39 +EXPORT_SYMBOL_GPL(expand_files);
40
41 static int count_open_files(struct fdtable *fdt)
42 {
43 --- a/kernel/exit.c
44 +++ b/kernel/exit.c
45 @@ -508,6 +508,7 @@ struct files_struct *get_files_struct(st
46
47 return files;
48 }
49 +EXPORT_SYMBOL_GPL(get_files_struct);
50
51 void put_files_struct(struct files_struct *files)
52 {
53 @@ -527,6 +528,7 @@ void put_files_struct(struct files_struc
54 free_fdtable(fdt);
55 }
56 }
57 +EXPORT_SYMBOL_GPL(put_files_struct);
58
59 void reset_files_struct(struct files_struct *files)
60 {
61 --- a/kernel/fork.c
62 +++ b/kernel/fork.c
63 @@ -160,6 +160,7 @@ void __put_task_struct(struct task_struc
64 if (!profile_handoff_task(tsk))
65 free_task(tsk);
66 }
67 +EXPORT_SYMBOL_GPL(__put_task_struct);
68
69 /*
70 * macro override instead of weak attribute alias, to workaround
71 --- a/kernel/sched.c
72 +++ b/kernel/sched.c
73 @@ -5666,6 +5666,7 @@ int can_nice(const struct task_struct *p
74 return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
75 capable(CAP_SYS_NICE));
76 }
77 +EXPORT_SYMBOL_GPL(can_nice);
78
79 #ifdef __ARCH_WANT_SYS_NICE
80
81 --- a/mm/memory.c
82 +++ b/mm/memory.c
83 @@ -1063,6 +1063,7 @@ unsigned long zap_page_range(struct vm_a
84 tlb_finish_mmu(tlb, address, end);
85 return end;
86 }
87 +EXPORT_SYMBOL_GPL(zap_page_range);
88
89 /**
90 * zap_vma_ptes - remove ptes mapping the vma
91 @@ -2438,6 +2439,7 @@ int vmtruncate_range(struct inode *inode
92
93 return 0;
94 }
95 +EXPORT_SYMBOL_GPL(vmtruncate_range);
96
97 /*
98 * We enter with non-exclusive mmap_sem (to exclude vma changes,
99 --- a/mm/vmalloc.c
100 +++ b/mm/vmalloc.c
101 @@ -1101,6 +1101,7 @@ void unmap_kernel_range(unsigned long ad
102 vunmap_page_range(addr, end);
103 flush_tlb_kernel_range(addr, end);
104 }
105 +EXPORT_SYMBOL_GPL(unmap_kernel_range);
106
107 int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
108 {
109 @@ -1214,6 +1215,7 @@ struct vm_struct *get_vm_area(unsigned l
110 return __get_vm_area_node(size, flags, VMALLOC_START, VMALLOC_END,
111 -1, GFP_KERNEL, __builtin_return_address(0));
112 }
113 +EXPORT_SYMBOL_GPL(get_vm_area);
114
115 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
116 void *caller)
117 --- a/include/linux/mm.h
118 +++ b/include/linux/mm.h
119 @@ -726,6 +726,7 @@ static inline int shmem_lock(struct file
120 #endif
121 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
122
123 +void shmem_set_file(struct vm_area_struct *vma, struct file *file);
124 int shmem_zero_setup(struct vm_area_struct *);
125
126 #ifndef CONFIG_MMU
127 --- a/kernel/signal.c
128 +++ b/kernel/signal.c
129 @@ -1053,6 +1053,7 @@ struct sighand_struct *lock_task_sighand
130
131 return sighand;
132 }
133 +EXPORT_SYMBOL(lock_task_sighand);
134
135 /*
136 * send signal info to all the members of a group
This page took 0.043854 seconds and 5 git commands to generate.