diff options
author | Hugh Dickins <hughd@google.com> | 2012-05-29 15:06:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 16:22:22 -0700 |
commit | 83e4fa9c16e4af7122e31be3eca5d57881d236fe (patch) | |
tree | 594bc4152a58314a3f5068aefaa28783d1f2021a /Kbuild | |
parent | ec9516fbc5fa814014991e1ae7f8860127122105 (diff) | |
download | op-kernel-dev-83e4fa9c16e4af7122e31be3eca5d57881d236fe.zip op-kernel-dev-83e4fa9c16e4af7122e31be3eca5d57881d236fe.tar.gz |
tmpfs: support fallocate FALLOC_FL_PUNCH_HOLE
tmpfs has supported hole-punching since 2.6.16, via
madvise(,,MADV_REMOVE).
But nowadays fallocate(,FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE,,) is
the agreed way to punch holes.
So add shmem_fallocate() to support that, and tweak shmem_truncate_range()
to support partial pages at both the beginning and end of range (never
needed for madvise, which demands rounded addr and rounds up length).
Based-on-patch-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Cong Wang <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions