acrn-kernel/fs/ext4
Eric Whitney 0ca3768534 ext4: correct inline offset when handling xattrs in inode body
commit 6909cf5c41 upstream.

When run on a file system where the inline_data feature has been
enabled, xfstests generic/269, generic/270, and generic/476 cause ext4
to emit error messages indicating that inline directory entries are
corrupted.  This occurs because the inline offset used to locate
inline directory entries in the inode body is not updated when an
xattr in that shared region is deleted and the region is shifted in
memory to recover the space it occupied.  If the deleted xattr precedes
the system.data attribute, which points to the inline directory entries,
that attribute will be moved further up in the region.  The inline
offset continues to point to whatever is located in system.data's former
location, with unfortunate effects when used to access directory entries
or (presumably) inline data in the inode body.

Cc: stable@kernel.org
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Link: https://lore.kernel.org/r/20230522181520.1570360-1-enwlinux@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:50:31 +02:00
..
.kunitconfig
Kconfig
Makefile
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c
crypto.c
dir.c
ext4.h
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c
extents_status.c
extents_status.h
fast_commit.c
fast_commit.h
file.c
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c
indirect.c ext4: only update i_reserved_data_blocks on successful block allocation 2023-07-23 13:49:34 +02:00
inline.c
inode-test.c
inode.c ext4: only update i_reserved_data_blocks on successful block allocation 2023-07-23 13:49:34 +02:00
ioctl.c ext4: fix to check return value of freeze_bdev() in ext4_shutdown() 2023-07-23 13:49:34 +02:00
mballoc.c ext4: fix wrong unit use in ext4_mb_new_blocks 2023-07-23 13:49:33 +02:00
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c
orphan.c
page-io.c
readpage.c
resize.c
super.c ext4: turn quotas off if mount failed after enabling quotas 2023-07-23 13:49:34 +02:00
symlink.c
sysfs.c
truncate.h
verity.c
xattr.c ext4: correct inline offset when handling xattrs in inode body 2023-07-27 08:50:31 +02:00
xattr.h
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c