* [PATCH] mm: mmap: remove the first mapping check
@ 2014-04-18 5:40 Huang Shijie
0 siblings, 0 replies; only message in thread
From: Huang Shijie @ 2014-04-18 5:40 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Huang Shijie
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>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-18 6:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 5:40 [PATCH] mm: mmap: remove the first mapping check Huang Shijie
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).