Skip to contentSkip to conversation

mm: Fix build for nommu systems

PATCH New Guenter Roeck 1 participant 1 message Jul 27, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: Fix build for nommu systems

Commit 31705a3a633b ("mm, mpx: add vm_flags_t vm_flags arg to do_mmap_pgoff()") added vm_flags as parameter to do_mmap_pgoff(). The resulting code for nommu systems no longer compiles.

The fix matches the mmu code changes.

Fixes 31705a3a633b ("mm, mpx: add vm_flags_t vm_flags arg to
	do_mmap_pgoff()")
Cc Dave Hansen <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Oleg Nesterov <[email protected]>
---
 mm/nommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/nommu.c +2 -2
index 530eea5af989..af2196e35013 100644
@@ -1245,7 +1245,7 @@ unsigned long do_mmap(struct file *file,
 	struct vm_area_struct *vma;
 	struct vm_region *region;
 	struct rb_node *rb;
-	unsigned long capabilities, vm_flags, result;
+	unsigned long capabilities, result;
 	int ret;
 
 	*populate = 0;
@@ -1263,7 +1263,7 @@ unsigned long do_mmap(struct file *file,
 
 	/* we've determined that we can make the mapping, now translate what we
 	 * now know into VMA flags */
-	vm_flags = determine_vm_flags(file, prot, flags, capabilities);
+	vm_flags |= determine_vm_flags(file, prot, flags, capabilities);
 
 	/* we're going to need to record the mapping */
 	region = kmem_cache_zalloc(vm_region_jar, GFP_KERNEL);
Signature · 7 lines
2.1.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>