huge-tmpfs-shmem_is_hugevma-inode-index.patch removed from -mm tree
The patch titled
Subject: huge tmpfs: shmem_is_huge(vma, inode, index)
has been removed from the -mm tree. Its filename was
huge-tmpfs-shmem_is_hugevma-inode-index.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Hugh Dickins <[email protected]>
Subject: huge tmpfs: shmem_is_huge(vma, inode, index)
Extend shmem_huge_enabled(vma) to shmem_is_huge(vma, inode, index), so that a consistent set of checks can be applied, even when the inode is accessed through read/write syscalls (with NULL vma) instead of mmaps (the index argument is seldom of interest, but required by mount option "huge=within_size"). Clean up and rearrange the checks a little.
This then replaces the checks which shmem_fault() and shmem_getpage_gfp() were making, and eliminates the SGP_HUGE and SGP_NOHUGE modes.
Replace a couple of 0s by explicit SHMEM_HUGE_NEVERs; and replace the obscure !shmem_mapping() symlink check by explicit S_ISLNK() - nothing else needs that symlink check, so leave it there in shmem_getpage_gfp().
---
include/linux/shmem_fs.h | 9 ++- mm/shmem.c | 84 +++++++++++-------------------------- 2 files changed, 31 insertions(+), 62 deletions(-)
include/linux/shmem_fs.h renamed from include/linux/shmem_fs.h~huge-tmpfs-shmem_is_hugevma-inode-index +6 -3
@@ -86,7 +86,12 @@ extern void shmem_truncate_range(structextern int shmem_unuse (unsigned int type,bool frontswap,unsigned long *fs_pages_to_unuse); -extern bool shmem_huge_enabled (struct vm_area_struct *vma); +extern bool shmem_is_huge (struct vm_area_struct *vma, +struct inode *inode,pgoff_t index); +static inline bool shmem_huge_enabled (struct vm_area_struct *vma) +{ +return shmem_is_huge (vma,file_inode (vma->vm_file), vma->vm_pgoff); +}extern unsigned long shmem_swap_usage (struct vm_area_struct *vma);extern unsigned long shmem_partial_swap_usage (struct address_space *mapping,pgoff_t start,pgoff_t end);
@@ -96,8 +101,6 @@ enum sgp_type {SGP_READ ,/* don't exceed i_size, don't allocate page */ SGP_NOALLOC ,/* similar, but fail on hole or use fallocated page */ SGP_CACHE ,/* don't exceed i_size, may allocate page */ -SGP_NOHUGE ,/* like SGP_CACHE, but no huge pages */ -SGP_HUGE ,/* like SGP_CACHE, huge pages preferred */ SGP_WRITE ,/* may exceed i_size, may allocate !Uptodate page */ SGP_FALLOC, /* like SGP_WRITE, but make existing page Uptodate */ };
mm/shmem.c renamed from mm/shmem.c~huge-tmpfs-shmem_is_hugevma-inode-index +25 -59
150 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are