+ fork-use-vma_pages-to-simplify-the-code.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fork: use vma_pages() to simplify the code
has been added to the -mm tree.  Its filename is
     fork-use-vma_pages-to-simplify-the-code.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Huang Shijie <shijie8@xxxxxxxxx>
Subject: fork: use vma_pages() to simplify the code

The current code can be replaced by vma_pages().  So use it to simplify
the code.

Signed-off-by: Huang Shijie <shijie8@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/fork.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/fork.c~fork-use-vma_pages-to-simplify-the-code kernel/fork.c
--- a/kernel/fork.c~fork-use-vma_pages-to-simplify-the-code
+++ a/kernel/fork.c
@@ -384,7 +384,7 @@ static int dup_mmap(struct mm_struct *mm
 		charge = 0;
 		if (mpnt->vm_flags & VM_ACCOUNT) {
 			unsigned long len;
-			len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
+			len = vma_pages(mpnt);
 			if (security_vm_enough_memory_mm(oldmm, len)) /* sic */
 				goto fail_nomem;
 			charge = len;
_
Subject: Subject: fork: use vma_pages() to simplify the code

Patches currently in -mm which might be from shijie8@xxxxxxxxx are

linux-next.patch
mm-account-the-total_vm-in-the-vm_stat_account.patch
fork-use-vma_pages-to-simplify-the-code.patch
fork-use-vma_pages-to-simplify-the-code-fix.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux