OSDN Git Service

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>
Tue, 14 Aug 2018 12:17:11 +0000 (17:47 +0530)
commiteeac977c8bcb4a92b93af81ecc6ad349c2b31bcc
tree9437dcdba865cd30b3a8669184c9122d1217f284
parentc9474934b07bccd77dfdcac57de455b849188f20
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