]> git.ipfire.org Git - thirdparty/linux.git/commit - mm/memory.c
mm: remove enum page_entry_size
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 18 Aug 2023 20:23:35 +0000 (21:23 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 24 Aug 2023 23:20:30 +0000 (16:20 -0700)
commit1d024e7a8dabcc3c84d77532a88c774c32cf8245
tree054d0ee873c69836f7dae835b19d11006e1e27f6
parent40d49a3c9e4a0e5cf7a6fcebc8d4d7d63d1f3f1b
mm: remove enum page_entry_size

Remove the unnecessary encoding of page order into an enum and pass the
page order directly.  That lets us get rid of pe_order().

The switch constructs have to be changed to if/else constructs to prevent
GCC from warning on builds with 3-level page tables where PMD_ORDER and
PUD_ORDER have the same value.

If you are looking at this commit because your driver stopped compiling,
look at the previous commit as well and audit your driver to be sure it
doesn't depend on mmap_lock being held in its ->huge_fault method.

[willy@infradead.org: use "order %u" to match the (non dev_t) style]
Link: https://lkml.kernel.org/r/ZOUYekbtTv+n8hYf@casper.infradead.org
Link: https://lkml.kernel.org/r/20230818202335.2739663-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/dax/device.c
fs/dax.c
fs/erofs/data.c
fs/ext2/file.c
fs/ext4/file.c
fs/fuse/dax.c
fs/xfs/xfs_file.c
fs/xfs/xfs_trace.h
include/linux/dax.h
include/linux/mm.h
mm/memory.c