From: Huang Shijie <b32955@freescale.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, Huang Shijie <b32955@freescale.com>
Subject: [PATCH] mm: mmap: remove the first mapping check
Date: Fri, 18 Apr 2014 13:40:50 +0800 [thread overview]
Message-ID: <1397799650-28977-1-git-send-email-b32955@freescale.com> (raw)
Remove the first mapping check for vma_link.
move the mutex_lock into the braces when vma->vm_file is true.
Signed-off-by: Huang Shijie <b32955@freescale.com>
---
mm/mmap.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index b1202cf..e77526a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -640,11 +640,10 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma,
{
struct address_space *mapping = NULL;
- if (vma->vm_file)
+ if (vma->vm_file) {
mapping = vma->vm_file->f_mapping;
-
- if (mapping)
mutex_lock(&mapping->i_mmap_mutex);
+ }
__vma_link(mm, vma, prev, rb_link, rb_parent);
__vma_link_file(vma);
--
1.7.2.rc3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2014-04-18 6:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397799650-28977-1-git-send-email-b32955@freescale.com \
--to=b32955@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).