ntfs: compare streams_interface with mounted volume on remount

During reconfiguration, fc->s_fs_info points to a newly allocated
ntfs_volume. It does not contain the mounted volume's stream setting.
Consequently, a windows mount rejects a remount with the same
streams_interface=windows setting, but accepts streams_interface=none
without changing the active pathname interface. This also breaks an
ordinary read-only remount when the existing windows setting is passed
again, for example from fstab.

Compare the requested setting with the mounted volume instead. Report
an unsupported change with ntfs_warning() so it does not invoke the
mounted filesystem's error-handling policy.

Fixes: 2de2cdd9cc08 ("ntfs: add pathname access for named streams")
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
DaeMyung Kang 2026-10-12 20:27:55 +09:00 committed by Namjae Jeon
parent d45f99f816
commit 16702fb84f

View File

@ -275,9 +275,9 @@ static int ntfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
result.uint_32 == STREAMS_INTERFACE_WINDOWS;
if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE &&
NVolStreamsWindows(vol) != streams_windows) {
ntfs_error(vol->sb,
"Cannot change streams_interface on remount.");
NVolStreamsWindows(NTFS_SB(fc->root->d_sb)) != streams_windows) {
ntfs_warning(fc->root->d_sb,
"Cannot change streams_interface on remount.");
return -EINVAL;
}
if (streams_windows)