acrn-kernel/fs
Zhang Yi f19d8f9368 ext4: fix incorrect options show of original mount_opt and extend mount_opt2
[ Upstream commit e3645d72f8 ]

Current _ext4_show_options() do not distinguish MOPT_2 flag, so it mixed
extend sbi->s_mount_opt2 options with sbi->s_mount_opt, it could lead to
show incorrect options, e.g. show fc_debug_force if we mount with
errors=continue mode and miss it if we set.

  $ mkfs.ext4 /dev/pmem0
  $ mount -o errors=remount-ro /dev/pmem0 /mnt
  $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force
    #empty
  $ mount -o remount,errors=continue /mnt
  $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force
    fc_debug_force
  $ mount -o remount,errors=remount-ro,fc_debug_force /mnt
  $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force
    #empty

Fixes: 995a3ed67f ("ext4: add fast_commit feature and handling for extended mount options")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230129034939.3702550-1-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:55:27 +01:00
..
9p use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
adfs
affs affs: initialize fsdata in affs_truncate() 2023-02-01 08:34:08 +01:00
afs use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
autofs
befs
bfs
btrfs btrfs: hold block group refcount during async discard 2023-03-10 09:34:06 +01:00
cachefiles
ceph ceph: update the time stamps and try to drop the suid/sgid 2023-03-10 09:34:25 +01:00
cifs cifs: return a single-use cfid if we did not get a lease 2023-03-10 09:34:06 +01:00
coda coda: Avoid partial allocation of sig_inputArgs 2023-03-10 09:33:52 +01:00
configfs configfs: fix possible memory leak in configfs_create_dir() 2022-12-31 13:32:22 +01:00
cramfs fs/cramfs/inode.c: initialize file_ra_state 2023-03-10 09:34:09 +01:00
crypto
debugfs
devpts
dlm fs: dlm: send FIN ack back in right cases 2023-03-10 09:34:08 +01:00
ecryptfs
efivarfs
efs
erofs erofs: relinquish volume with mutex held 2023-03-10 09:32:46 +01:00
exfat exfat: fix inode->i_blocks for non-512 byte sector size device 2023-03-10 09:34:08 +01:00
exportfs
ext2 ext2: unbugger ext2_empty_dir() 2023-01-07 11:11:40 +01:00
ext4 ext4: fix incorrect options show of original mount_opt and extend mount_opt2 2023-03-11 13:55:27 +01:00
f2fs f2fs: synchronize atomic write aborts 2023-03-11 13:55:23 +01:00
fat
freevxfs
fscache fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() 2023-02-22 12:59:43 +01:00
fuse fuse: add inode/permission checks to fileattr_get/fileattr_set 2023-03-10 09:34:24 +01:00
gfs2 gfs2: Improve gfs2_make_fs_rw error handling 2023-03-10 09:33:59 +01:00
hfs hfs: fix missing hfs_bnode_get() in __hfs_bnode_create 2023-03-10 09:34:07 +01:00
hfsplus fs: hfsplus: fix UAF issue in hfsplus_put_super 2023-03-10 09:34:07 +01:00
hostfs
hpfs
hugetlbfs hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param() 2022-12-31 13:33:05 +01:00
iomap
isofs
jbd2 jbd2: fix data missing when reusing bh which is ready to be checkpointed 2023-03-10 09:34:20 +01:00
jffs2
jfs fs/jfs: fix shift exponent db_agl2size negative 2023-03-11 13:55:16 +01:00
kernfs
ksmbd ksmbd: fix possible memory leak in smb2_lock() 2023-03-10 09:34:07 +01:00
lockd
minix
netfs use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
nfs NFS: fix disabling of swap 2023-03-10 09:33:22 +01:00
nfs_common
nfsd nfsd: don't hand out delegation on setuid files being opened for write 2023-03-10 09:34:01 +01:00
nilfs2 nilfs2: fix underflow in second superblock position calculations 2023-02-22 12:59:49 +01:00
nls
notify
ntfs
ntfs3 fs/ntfs3: Validate attribute data and valid sizes 2023-02-09 11:28:26 +01:00
ocfs2 ocfs2: fix non-auto defrag path not working issue 2023-03-10 09:34:09 +01:00
omfs
openpromfs
orangefs use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
overlayfs ovl: Use "buf" flexible array for memcpy() destination 2023-02-09 11:28:26 +01:00
proc mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps 2023-02-09 11:28:20 +01:00
pstore pstore/zone: Use GFP_ATOMIC to allocate zone buffer 2023-01-04 11:28:59 +01:00
qnx4
qnx6
quota ext4: fix bug_on in __es_tree_search caused by bad quota inode 2023-01-07 11:11:59 +01:00
ramfs
reiserfs reiserfs: Add missing calls to reiserfs_security_free() 2022-12-31 13:33:10 +01:00
romfs
smbfs_common
squashfs revert "squashfs: harden sanity check in squashfs_read_xattr_id_table" 2023-02-22 12:59:50 +01:00
sysfs
sysv
tracefs
ubifs ubifs: ubifs_releasepage: Remove ubifs_assert(0) to valid this process 2023-03-11 13:55:21 +01:00
udf udf: Fix file corruption when appending just after end of preallocated extent 2023-03-10 09:34:10 +01:00
ufs
unicode
vboxsf
verity
xfs
zonefs zonefs: Detect append writes at invalid locations 2023-01-24 07:24:33 +01:00
Kconfig
Kconfig.binfmt
Makefile
aio.c aio: fix mremap after fork null-deref 2023-02-22 12:59:46 +01:00
anon_inodes.c
attr.c attr: use consistent sgid stripping checks 2023-03-03 11:52:25 +01:00
bad_inode.c
binfmt_elf.c elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} 2023-01-18 11:58:12 +01:00
binfmt_elf_fdpic.c elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} 2023-01-18 11:58:12 +01:00
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c binfmt_misc: fix shift-out-of-bounds in check_special_flags 2022-12-31 13:32:57 +01:00
binfmt_script.c
buffer.c
char_dev.c chardev: fix error handling in cdev_device_add() 2022-12-31 13:32:41 +01:00
compat_binfmt_elf.c
coredump.c coredump: Move dump_emit_page() to kill unused warning 2023-02-22 12:59:50 +01:00
d_path.c
dax.c
dcache.c
direct-io.c
drop_caches.c
eventfd.c eventfd: provide a eventfd_signal_mask() helper 2023-01-04 11:28:48 +01:00
eventpoll.c eventpoll: add EPOLL_URING_WAKE poll wakeup flag 2023-01-04 11:28:47 +01:00
exec.c
fcntl.c
fhandle.c
file.c
file_table.c
filesystems.c
fs-writeback.c
fs_context.c
fs_parser.c ext4: journal_path mount options should follow links 2023-01-07 11:11:59 +01:00
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c attr: use consistent sgid stripping checks 2023-03-03 11:52:25 +01:00
internal.h attr: use consistent sgid stripping checks 2023-03-03 11:52:25 +01:00
ioctl.c
kernel_read_file.c
libfs.c
locks.c filelock: new helper: vfs_inode_has_locks 2023-01-12 12:02:22 +01:00
mbcache.c ext4: fix deadlock due to mbcache entry corruption 2023-01-07 11:12:02 +01:00
mount.h
mpage.c
namei.c
namespace.c
no-block.c
nsfs.c
open.c fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected 2023-03-10 09:33:46 +01:00
pipe.c
pnode.c pnode: terminate at peers of source 2023-01-04 11:29:01 +01:00
pnode.h
posix_acl.c
proc_namespace.c
read_write.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
readdir.c
remap_range.c
select.c
seq_file.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
signalfd.c
splice.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
stack.c
stat.c
statfs.c
super.c fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected 2023-03-10 09:33:46 +01:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a VMA 2023-01-24 07:24:36 +01:00
utimes.c
xattr.c