change the calling conventions for vfs_parse_fs_string()

Absolute majority of callers are passing the 4th argument equal to
strlen() of the 3rd one.

Drop the v_size argument, add vfs_parse_fs_qstr() for the cases that
want independent length.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2025-06-28 11:37:30 -04:00
parent 8f5ae30d69
commit b28f9eba12
12 changed files with 49 additions and 41 deletions

View File

@@ -504,10 +504,18 @@ returned.
clear the pointer, but then becomes responsible for disposing of the
object.
* ::
int vfs_parse_fs_qstr(struct fs_context *fc, const char *key,
const struct qstr *value);
A wrapper around vfs_parse_fs_param() that copies the value string it is
passed.
* ::
int vfs_parse_fs_string(struct fs_context *fc, const char *key,
const char *value, size_t v_size);
const char *value);
A wrapper around vfs_parse_fs_param() that copies the value string it is
passed.

View File

@@ -1285,3 +1285,15 @@ rather than a VMA, as the VMA at this stage is not yet valid.
The vm_area_desc provides the minimum required information for a filesystem
to initialise state upon memory mapping of a file-backed region, and output
parameters for the file system to set this state.
---
**mandatory**
Calling conventions for vfs_parse_fs_string() have changed; it does *not*
take length anymore (value ? strlen(value) : 0 is used). If you want
a different length, use
vfs_parse_fs_qstr(fc, key, &QSTR_LEN(value, len))
instead.