projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2329d37
)
mm/mmap.c: remove the first mapping check
author
Huang Shijie
<
[email protected]
>
Wed, 4 Jun 2014 23:07:33 +0000
(16:07 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 4 Jun 2014 23:54:01 +0000
(16:54 -0700)
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 <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/mmap.c
patch
|
blob
|
history
diff --git
a/mm/mmap.c
b/mm/mmap.c
index 6cdec3a6f4bfb5687833d5383576511f0e26b689..8a56d39df4ed2af8c46be660dfc73056798fced4 100644
(file)
--- 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);