[PATCH] shmem: fixup memory reservation during truncating

2013-09-13 Thread Konstantin Khlebnikov
Shared anon mappings created without MAP_NORESERVE may hold reservation of memory commitment for whole size of shmem segment. There was no way to change that size, but recently introduced 'map_files' in proc allows to do that. This patch adjust memory reservation in shmem_setattr() during

[PATCH] shmem: fixup memory reservation during truncating

2013-09-13 Thread Konstantin Khlebnikov
Shared anon mappings created without MAP_NORESERVE may hold reservation of memory commitment for whole size of shmem segment. There was no way to change that size, but recently introduced 'map_files' in proc allows to do that. This patch adjust memory reservation in shmem_setattr() during