WSL2-Linux-Kernel/fs
Yang Shi 7da4e2cb8b mm: thp: kill __transhuge_page_enabled()
The page fault path checks THP eligibility with __transhuge_page_enabled()
which does the similar thing as hugepage_vma_check(), so use
hugepage_vma_check() instead.

However page fault allows DAX and !anon_vma cases, so added a new flag,
in_pf, to hugepage_vma_check() to make page fault work correctly.

The in_pf flag is also used to skip shmem and file THP for page fault
since shmem handles THP in its own shmem_fault() and file THP allocation
on fault is not supported yet.

Also remove hugepage_vma_enabled() since hugepage_vma_check() is the only
caller now, it is not necessary to have a helper function.

Link: https://lkml.kernel.org/r/20220616174840.1202070-6-shy828301@gmail.com
Signed-off-by: Yang Shi <shy828301@gmail.com>
Reviewed-by: Zach O'Keefe <zokeefe@google.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-17 17:14:33 -07:00
..
9p 9p: fix EBADF errors in cached mode 2022-06-17 06:03:30 +09:00
adfs
affs
afs afs: Fix dynamic root getattr 2022-06-21 11:47:30 -05:00
autofs
befs
bfs
btrfs mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
cachefiles
ceph netfs: Rename the netfs_io_request cleanup op and give it an op pointer 2022-06-10 20:55:21 +01:00
cifs cifs: update cifs_ses::ip_addr after failover 2022-06-24 13:34:28 -05:00
coda
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
erofs dax: introduce holder for dax_device 2022-07-17 17:14:30 -07:00
exfat exfat: use updated exfat_chain directly during renaming 2022-06-09 21:26:32 +09:00
exportfs
ext2 dax: introduce holder for dax_device 2022-07-17 17:14:30 -07:00
ext4 dax: introduce holder for dax_device 2022-07-17 17:14:30 -07:00
f2fs mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
fat Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
freevxfs SPDX changes for 5.19-rc1 2022-06-03 10:34:34 -07:00
fscache
fuse libnvdimm for 5.19 2022-05-27 15:49:30 -07:00
gfs2 mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs hugetlbfs: zero partial pages during fallocate hole punch 2022-06-16 19:11:32 -07:00
iomap
isofs
jbd2 mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
jffs2 This pull request contains fixes for JFFS2, UBI and UBIFS 2022-06-03 14:42:24 -07:00
jfs JFS: One bug fix and some code cleanup 2022-05-27 15:59:21 -07:00
kernfs
ksmbd ksmbd: smbd: relax the count of sges required 2022-05-27 21:31:20 -05:00
lockd
minix
netfs netfs: Rename the netfs_io_request cleanup op and give it an op pointer 2022-06-10 20:55:21 +01:00
nfs mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
nfs_common
nfsd mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
nilfs2
nls
notify
ntfs Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
ntfs3 Ntfs3 for 5.19 2022-06-03 16:57:16 -07:00
ocfs2 Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
omfs
openpromfs
orangefs
overlayfs overlayfs update for 5.19 2022-05-30 11:19:16 -07:00
proc mm: thp: kill __transhuge_page_enabled() 2022-07-17 17:14:33 -07:00
pstore
qnx4
qnx6
quota mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
ramfs
reiserfs
romfs
smbfs_common
squashfs
sysfs
sysv Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
tracefs tracefs: Fix syntax errors in comments 2022-06-17 19:01:28 -04:00
ubifs mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
udf
ufs
unicode
vboxsf
verity
xfs xfs: add dax dedupe support 2022-07-17 17:14:32 -07:00
zonefs zonefs: fix zonefs_iomap_begin() for reads 2022-06-08 19:13:55 +09:00
Kconfig
Kconfig.binfmt m68knommu: changes for linux 5.19 2022-05-30 10:56:18 -07:00
Makefile
aio.c
anon_inodes.c
attr.c fs: account for group membership 2022-06-14 12:18:47 +02:00
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c fsdax: dedup file range to use a compare function 2022-07-17 17:14:32 -07:00
dcache.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
fcntl.c
fhandle.c
file.c fix the breakage in close_fd_get_file() calling conventions change 2022-06-05 15:03:03 -04:00
file_table.c Descriptor handling cleanups 2022-06-04 18:52:00 -07:00
filesystems.c
fs-writeback.c writeback: Fix inode->i_io_list not be protected by inode->i_lock error 2022-06-06 09:54:30 +02:00
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c writeback: Fix inode->i_io_list not be protected by inode->i_lock error 2022-06-06 09:54:30 +02:00
internal.h Cleanups (and one fix) around struct mount handling. 2022-06-04 19:00:05 -07:00
io-wq.c
io-wq.h
io_uring.c io_uring: use original request task for inflight tracking 2022-06-23 11:06:43 -06:00
ioctl.c
kernel_read_file.c
libfs.c
locks.c
mbcache.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
mount.h
mpage.c
namei.c Several cleanups in fs/namei.c. 2022-06-04 19:07:15 -07:00
namespace.c Cleanups (and one fix) around struct mount handling. 2022-06-04 19:00:05 -07:00
no-block.c
nsfs.c
open.c RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
pipe.c Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c fsdax: dedup file range to use a compare function 2022-07-17 17:14:32 -07:00
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
statfs.c
super.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c