]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 28 Nov 2025 19:22:44 +0000 (14:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:34 +0000 (14:03 +0100)
commitdf9b003a2ecacc7218486fbb31fe008c93097d5f
tree476315632275b5faaff20f7e97ae86ee6e297bcf
parentc30cb13edcbff4145fe1bbb5898126717fe07f6a
NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags

[ Upstream commit 8675c69816e4276b979ff475ee5fac4688f80125 ]

When a filesystem is being automounted, it needs to preserve the
user-set superblock mount options, such as the "ro" flag.

Reported-by: Li Lingfeng <lilingfeng3@huawei.com>
Link: https://lore.kernel.org/all/20240604112636.236517-3-lilingfeng@huaweicloud.com/
Fixes: f2aedb713c28 ("NFS: Add fs_context support.")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/namespace.c
fs/nfs/super.c