Files
linux/fs/9p
Eric Sandeen fe9a3154bb 9p: fix cache/debug options printing in v9fs_show_options
[ Upstream commit f044561331 ]

commit 4eb3117888 changed the cache= option to accept either string
shortcuts or bitfield values. It also changed /proc/mounts to emit the
option as the hexadecimal numeric value rather than the shortcut string.

However, by printing "cache=%x" without the leading 0x, shortcuts such
as "cache=loose" will emit "cache=f" and 'f' is not a string that is
parseable by kstrtoint(), so remounting may fail if a remount with
"cache=f" is attempted.

debug=%x has had the same problem since options have been displayed in
c4fac91004 ("9p: Implement show_options")

Fix these by adding the 0x prefix to the hexadecimal value shown in
/proc/mounts.

Fixes: 4eb3117888 ("fs/9p: Rework cache modes and add new options to Documentation")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Message-ID: <54b93378-dcf1-4b04-922d-c8b4393da299@redhat.com>
[Dominique: use %#x at Al Viro's suggestion, also handle debug]
Tested-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-12-18 14:03:32 +01:00
..
2023-01-19 09:24:27 +01:00
2023-05-04 21:46:57 +01:00
2025-01-27 19:25:24 -05:00
2024-01-26 16:46:56 +00:00