mm/mmap.c: whitespace fixes
Signed-off-by: vishnu.ps <vishnu.ps@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
bf0dea23a9
commit
cc71aba348
25
mm/mmap.c
25
mm/mmap.c
@@ -741,7 +741,7 @@ again: remove_next = 1 + (end > next->vm_end);
|
|||||||
* split_vma inserting another: so it must be
|
* split_vma inserting another: so it must be
|
||||||
* mprotect case 4 shifting the boundary down.
|
* mprotect case 4 shifting the boundary down.
|
||||||
*/
|
*/
|
||||||
adjust_next = - ((vma->vm_end - end) >> PAGE_SHIFT);
|
adjust_next = -((vma->vm_end - end) >> PAGE_SHIFT);
|
||||||
exporter = vma;
|
exporter = vma;
|
||||||
importer = next;
|
importer = next;
|
||||||
}
|
}
|
||||||
@@ -1235,7 +1235,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
|
|||||||
unsigned long flags, unsigned long pgoff,
|
unsigned long flags, unsigned long pgoff,
|
||||||
unsigned long *populate)
|
unsigned long *populate)
|
||||||
{
|
{
|
||||||
struct mm_struct * mm = current->mm;
|
struct mm_struct *mm = current->mm;
|
||||||
vm_flags_t vm_flags;
|
vm_flags_t vm_flags;
|
||||||
|
|
||||||
*populate = 0;
|
*populate = 0;
|
||||||
@@ -2321,13 +2321,13 @@ int expand_stack(struct vm_area_struct *vma, unsigned long address)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct vm_area_struct *
|
struct vm_area_struct *
|
||||||
find_extend_vma(struct mm_struct * mm, unsigned long addr)
|
find_extend_vma(struct mm_struct *mm, unsigned long addr)
|
||||||
{
|
{
|
||||||
struct vm_area_struct * vma;
|
struct vm_area_struct *vma;
|
||||||
unsigned long start;
|
unsigned long start;
|
||||||
|
|
||||||
addr &= PAGE_MASK;
|
addr &= PAGE_MASK;
|
||||||
vma = find_vma(mm,addr);
|
vma = find_vma(mm, addr);
|
||||||
if (!vma)
|
if (!vma)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (vma->vm_start <= addr)
|
if (vma->vm_start <= addr)
|
||||||
@@ -2376,7 +2376,7 @@ static void unmap_region(struct mm_struct *mm,
|
|||||||
struct vm_area_struct *vma, struct vm_area_struct *prev,
|
struct vm_area_struct *vma, struct vm_area_struct *prev,
|
||||||
unsigned long start, unsigned long end)
|
unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *next = prev? prev->vm_next: mm->mmap;
|
struct vm_area_struct *next = prev ? prev->vm_next : mm->mmap;
|
||||||
struct mmu_gather tlb;
|
struct mmu_gather tlb;
|
||||||
|
|
||||||
lru_add_drain();
|
lru_add_drain();
|
||||||
@@ -2423,7 +2423,7 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||||||
* __split_vma() bypasses sysctl_max_map_count checking. We use this on the
|
* __split_vma() bypasses sysctl_max_map_count checking. We use this on the
|
||||||
* munmap path where it doesn't make sense to fail.
|
* munmap path where it doesn't make sense to fail.
|
||||||
*/
|
*/
|
||||||
static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||||
unsigned long addr, int new_below)
|
unsigned long addr, int new_below)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *new;
|
struct vm_area_struct *new;
|
||||||
@@ -2512,7 +2512,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
|
|||||||
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
|
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if ((len = PAGE_ALIGN(len)) == 0)
|
len = PAGE_ALIGN(len);
|
||||||
|
if (len == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Find the first overlapping VMA */
|
/* Find the first overlapping VMA */
|
||||||
@@ -2558,7 +2559,7 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
|
|||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
vma = prev? prev->vm_next: mm->mmap;
|
vma = prev ? prev->vm_next : mm->mmap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* unlock any mlock()ed ranges before detaching vmas
|
* unlock any mlock()ed ranges before detaching vmas
|
||||||
@@ -2621,10 +2622,10 @@ static inline void verify_mm_writelocked(struct mm_struct *mm)
|
|||||||
*/
|
*/
|
||||||
static unsigned long do_brk(unsigned long addr, unsigned long len)
|
static unsigned long do_brk(unsigned long addr, unsigned long len)
|
||||||
{
|
{
|
||||||
struct mm_struct * mm = current->mm;
|
struct mm_struct *mm = current->mm;
|
||||||
struct vm_area_struct * vma, * prev;
|
struct vm_area_struct *vma, *prev;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct rb_node ** rb_link, * rb_parent;
|
struct rb_node **rb_link, *rb_parent;
|
||||||
pgoff_t pgoff = addr >> PAGE_SHIFT;
|
pgoff_t pgoff = addr >> PAGE_SHIFT;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user