tmpfs: three tweaks to creation time patch
authorHugh Dickins <hughd@google.com>
Mon, 28 Feb 2022 22:59:57 +0000 (09:59 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Feb 2022 22:59:57 +0000 (09:59 +1100)
commit51e971f89f3827030b8513c2f53e5719905b0246
tree3cb60b051242ef1624eb5bb35df6a30ca36452b0
parentdca3c652f7f3b2d88a2006e9fc5d199a5668552a
tmpfs: three tweaks to creation time patch

Thank you to Xavier Roche for his tmpfs file creation time patch.  Please
apply these 3 tweaks on top (and fold in when sending to Linus):

1. Move vfs_inode back to being last element of shmem_inode_info.
2. Remove unnecessary parentheses from condition in shmem_getattr().
3. Using shmem_getattr() on other file types than regular requires that
   shmem_is_huge() check type, to stop incorrect HPAGE_PMD_SIZE blksize.

Link: https://lkml.kernel.org/r/b954973a-b8d1-cab8-63bd-6ea8063de3@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Xavier Roche <xavier.roche@algolia.com>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
include/linux/shmem_fs.h
mm/shmem.c