File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -1123,33 +1123,6 @@ static unsigned long mtdchar_get_unmapped_area(struct file *file,
1123
1123
}
1124
1124
#endif
1125
1125
1126
- static inline unsigned long get_vm_size (struct vm_area_struct * vma )
1127
- {
1128
- return vma -> vm_end - vma -> vm_start ;
1129
- }
1130
-
1131
- static inline resource_size_t get_vm_offset (struct vm_area_struct * vma )
1132
- {
1133
- return (resource_size_t ) vma -> vm_pgoff << PAGE_SHIFT ;
1134
- }
1135
-
1136
- /*
1137
- * Set a new vm offset.
1138
- *
1139
- * Verify that the incoming offset really works as a page offset,
1140
- * and that the offset and size fit in a resource_size_t.
1141
- */
1142
- static inline int set_vm_offset (struct vm_area_struct * vma , resource_size_t off )
1143
- {
1144
- pgoff_t pgoff = off >> PAGE_SHIFT ;
1145
- if (off != (resource_size_t ) pgoff << PAGE_SHIFT )
1146
- return - EINVAL ;
1147
- if (off + get_vm_size (vma ) - 1 < off )
1148
- return - EINVAL ;
1149
- vma -> vm_pgoff = pgoff ;
1150
- return 0 ;
1151
- }
1152
-
1153
1126
/*
1154
1127
* set up a mapping for shared memory segments
1155
1128
*/
You can’t perform that action at this time.
0 commit comments