nommu: remove a superfluous check of vm_region::vm_usage

In split_vma(), there's no need to check if the VMA being split has a
region that's in use by more than one VMA because:

(1) The preceding test prohibits splitting of non-anonymous VMAs and regions
(eg: file or chardev backed VMAs).

(2) Anonymous regions can't be mapped multiple times because there's no handle
by which to refer to the already existing region.

(3) If a VMA has previously been split, then the region backing it has also
been split into two regions, each of usage 1.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by David Howells and committed by Linus Torvalds 779c1023 1e2ae599

+3 -4
+3 -4
mm/nommu.c
··· 1441 1442 kenter(""); 1443 1444 - /* we're only permitted to split anonymous regions that have a single 1445 - * owner */ 1446 - if (vma->vm_file || 1447 - vma->vm_region->vm_usage != 1) 1448 return -ENOMEM; 1449 1450 if (mm->map_count >= sysctl_max_map_count)
··· 1441 1442 kenter(""); 1443 1444 + /* we're only permitted to split anonymous regions (these should have 1445 + * only a single usage on the region) */ 1446 + if (vma->vm_file) 1447 return -ENOMEM; 1448 1449 if (mm->map_count >= sysctl_max_map_count)