ramips: rt305x: add support for the ZyXEL NBG-419N board
[openwrt.git] / target / linux / generic / patches-3.1 / 950-vm_exports.patch
1 --- a/mm/shmem.c
2 +++ b/mm/shmem.c
3 @@ -2456,6 +2456,16 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
4
5 /* common code */
6
7 +void shmem_set_file(struct vm_area_struct *vma, struct file *file)
8 +{
9 + if (vma->vm_file)
10 + fput(vma->vm_file);
11 + vma->vm_file = file;
12 + vma->vm_ops = &shmem_vm_ops;
13 + vma->vm_flags |= VM_CAN_NONLINEAR;
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 @@ -2533,11 +2543,8 @@ 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 - vma->vm_flags |= VM_CAN_NONLINEAR;
29 + shmem_set_file(vma, file);
30 +
31 return 0;
32 }
33
34 --- a/fs/file.c
35 +++ b/fs/file.c
36 @@ -268,6 +268,7 @@ int expand_files(struct files_struct *fi
37 /* All good, so we try */
38 return expand_fdtable(files, nr);
39 }
40 +EXPORT_SYMBOL_GPL(expand_files);
41
42 static int count_open_files(struct fdtable *fdt)
43 {
44 --- a/kernel/exit.c
45 +++ b/kernel/exit.c
46 @@ -499,6 +499,7 @@ struct files_struct *get_files_struct(st
47
48 return files;
49 }
50 +EXPORT_SYMBOL_GPL(get_files_struct);
51
52 void put_files_struct(struct files_struct *files)
53 {
54 @@ -520,6 +521,7 @@ void put_files_struct(struct files_struc
55 rcu_read_unlock();
56 }
57 }
58 +EXPORT_SYMBOL_GPL(put_files_struct);
59
60 void reset_files_struct(struct files_struct *files)
61 {
62 --- a/kernel/sched.c
63 +++ b/kernel/sched.c
64 @@ -4967,6 +4967,7 @@ int can_nice(const struct task_struct *p
65 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
66 capable(CAP_SYS_NICE));
67 }
68 +EXPORT_SYMBOL_GPL(can_nice);
69
70 #ifdef __ARCH_WANT_SYS_NICE
71
72 --- a/mm/memory.c
73 +++ b/mm/memory.c
74 @@ -1385,6 +1385,7 @@ unsigned long zap_page_range(struct vm_a
75 tlb_finish_mmu(&tlb, address, end);
76 return end;
77 }
78 +EXPORT_SYMBOL_GPL(zap_page_range);
79
80 /**
81 * zap_vma_ptes - remove ptes mapping the vma
82 @@ -3060,6 +3061,7 @@ static inline int check_stack_guard_page
83 }
84 return 0;
85 }
86 +EXPORT_SYMBOL_GPL(vmtruncate_range);
87
88 /*
89 * We enter with non-exclusive mmap_sem (to exclude vma changes,
90 --- a/mm/vmalloc.c
91 +++ b/mm/vmalloc.c
92 @@ -1232,6 +1232,7 @@ void unmap_kernel_range(unsigned long ad
93 vunmap_page_range(addr, end);
94 flush_tlb_kernel_range(addr, end);
95 }
96 +EXPORT_SYMBOL_GPL(unmap_kernel_range);
97
98 int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages)
99 {
100 @@ -1347,6 +1348,7 @@ struct vm_struct *get_vm_area(unsigned l
101 return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END,
102 -1, GFP_KERNEL, __builtin_return_address(0));
103 }
104 +EXPORT_SYMBOL_GPL(get_vm_area);
105
106 struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags,
107 void *caller)
108 --- a/include/linux/mm.h
109 +++ b/include/linux/mm.h
110 @@ -872,6 +872,7 @@ extern bool skip_free_areas_node(unsigne
111
112 int shmem_lock(struct file *file, int lock, struct user_struct *user);
113 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
114 +void shmem_set_file(struct vm_area_struct *vma, struct file *file);
115 int shmem_zero_setup(struct vm_area_struct *);
116
117 extern int can_do_mlock(void);
This page took 0.050043 seconds and 5 git commands to generate.