nommu: allow private mappings of read-only devices
authorBernd Schmidt <bernds_cb1@t-online.de>
Wed, 26 May 2010 06:43:00 +0000 (23:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 May 2010 15:19:23 +0000 (08:19 -0700)
commit3c7b204547bc3d342a4e31196fe14803581d279f
tree87a3300d266eed413012efd0a985a72caad4a856
parent0cae3457b1a6e88f31020272bcfd90c178716053
nommu: allow private mappings of read-only devices

Slightly rearrange the logic that determines capabilities and vm_flags.
Disable BDI_CAP_MAP_DIRECT in all cases if the device can't support the
protections.  Allow private readonly mappings of readonly backing devices.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: David McCullough <davidm@snapgear.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/nommu.c