Unverified Commit 698d1b48 authored by Zijun Hu's avatar Zijun Hu Committed by Christian Brauner
Browse files

fs/fs_context: Mark an unlikely if condition with unlikely() in vfs_parse_monolithic_sep()



There is no mount option with pattern "...,=key_or_value,...", so the if
condition '(value == key)' in while loop of vfs_parse_monolithic_sep() is
is unlikely true.

Mark the condition with unlikely() to improve both performance and
readability.

Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/20250410-fix_fs-v1-5-7c14ccc8ebaa@quicinc.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 1d17057d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ int vfs_parse_monolithic_sep(struct fs_context *fc, void *data,
			char *value = strchr(key, '=');

			if (value) {
				if (value == key)
				if (unlikely(value == key))
					continue;
				*value++ = 0;
				v_len = strlen(value);