mm/mmap.c: fix coding style
Fix a little of the coding style in mm/mmap.c [akpm@linux-foundation.org: cleanup] Signed-off-by: ZhenwenXu <helight.xu@gmail.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
853ac43ab1
commit
48aae42556
1 changed files with 8 additions and 9 deletions
17
mm/mmap.c
17
mm/mmap.c
|
@ -413,7 +413,7 @@ void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||||
|
|
||||||
static void __vma_link_file(struct vm_area_struct *vma)
|
static void __vma_link_file(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
struct file * file;
|
struct file *file;
|
||||||
|
|
||||||
file = vma->vm_file;
|
file = vma->vm_file;
|
||||||
if (file) {
|
if (file) {
|
||||||
|
@ -474,11 +474,10 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||||
* insert vm structure into list and rbtree and anon_vma,
|
* insert vm structure into list and rbtree and anon_vma,
|
||||||
* but it has already been inserted into prio_tree earlier.
|
* but it has already been inserted into prio_tree earlier.
|
||||||
*/
|
*/
|
||||||
static void
|
static void __insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
|
||||||
__insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
|
|
||||||
{
|
{
|
||||||
struct vm_area_struct * __vma, * prev;
|
struct vm_area_struct *__vma, *prev;
|
||||||
struct rb_node ** rb_link, * rb_parent;
|
struct rb_node **rb_link, *rb_parent;
|
||||||
|
|
||||||
__vma = find_vma_prepare(mm, vma->vm_start,&prev, &rb_link, &rb_parent);
|
__vma = find_vma_prepare(mm, vma->vm_start,&prev, &rb_link, &rb_parent);
|
||||||
BUG_ON(__vma && __vma->vm_start < vma->vm_end);
|
BUG_ON(__vma && __vma->vm_start < vma->vm_end);
|
||||||
|
@ -908,7 +907,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
|
||||||
* The caller must hold down_write(current->mm->mmap_sem).
|
* The caller must hold down_write(current->mm->mmap_sem).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
|
unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
|
||||||
unsigned long len, unsigned long prot,
|
unsigned long len, unsigned long prot,
|
||||||
unsigned long flags, unsigned long pgoff)
|
unsigned long flags, unsigned long pgoff)
|
||||||
{
|
{
|
||||||
|
@ -1464,7 +1463,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
|
||||||
EXPORT_SYMBOL(get_unmapped_area);
|
EXPORT_SYMBOL(get_unmapped_area);
|
||||||
|
|
||||||
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
|
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
|
||||||
struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
|
struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *vma = NULL;
|
struct vm_area_struct *vma = NULL;
|
||||||
|
|
||||||
|
@ -1507,7 +1506,7 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
|
||||||
struct vm_area_struct **pprev)
|
struct vm_area_struct **pprev)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *vma = NULL, *prev = NULL;
|
struct vm_area_struct *vma = NULL, *prev = NULL;
|
||||||
struct rb_node * rb_node;
|
struct rb_node *rb_node;
|
||||||
if (!mm)
|
if (!mm)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -1541,7 +1540,7 @@ out:
|
||||||
* update accounting. This is shared with both the
|
* update accounting. This is shared with both the
|
||||||
* grow-up and grow-down cases.
|
* grow-up and grow-down cases.
|
||||||
*/
|
*/
|
||||||
static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, unsigned long grow)
|
static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, unsigned long grow)
|
||||||
{
|
{
|
||||||
struct mm_struct *mm = vma->vm_mm;
|
struct mm_struct *mm = vma->vm_mm;
|
||||||
struct rlimit *rlim = current->signal->rlim;
|
struct rlimit *rlim = current->signal->rlim;
|
||||||
|
|
Loading…
Reference in a new issue