ANDROID: sdcardfs: Directly pass lower file for mmap
authorDaniel Rosenberg <drosen@google.com>
Tue, 11 Apr 2017 03:54:30 +0000 (20:54 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 1 May 2017 09:32:43 +0000 (15:02 +0530)
commited966e3649596cbb488a5dbf178bacf965a26e4c
treeaf521bc5835f5f8a62731bfd9c3e1eb087f4eb42
parent8bbc8d5787cabafc0b782304882f5a7f2c80fbbb
ANDROID: sdcardfs: Directly pass lower file for mmap

Instead of relying on a copy hack, pass the lower file
as private data. This lets the kernel find the vma
mapping for pages used by the file, allowing pages
used by mapping to be reclaimed.

This is adapted from following esdfs patches
commit 0647e638d: ("esdfs: store lower file in vm_file for mmap")
commit 064850866: ("esdfs: keep a counter for mmaped file")

Change-Id: I75b74d1e5061db1b8c13be38d184e118c0851a1a
Signed-off-by: Daniel Rosenberg <drosen@google.com>
fs/sdcardfs/file.c
fs/sdcardfs/mmap.c