]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs_parse: add uid & gid option option parsing helpers
authorEric Sandeen <sandeen@redhat.com>
Fri, 28 Jun 2024 00:26:24 +0000 (19:26 -0500)
committerChristian Brauner <brauner@kernel.org>
Tue, 2 Jul 2024 04:20:49 +0000 (06:20 +0200)
commit9f111059e725f7ca79a136bfc734da3c8c1838b4
tree4f3606fbe72bb084930fddae3ff36bdad57f92ae
parent104eef133fd9c17e4dc28bf43f592a86f26d8a59
fs_parse: add uid & gid option option parsing helpers

Multiple filesystems take uid and gid as options, and the code to
create the ID from an integer and validate it is standard boilerplate
that can be moved into common helper functions, so do that for
consistency and less cut&paste.

This also helps avoid the buggy pattern noted by Seth Jenkins at
https://lore.kernel.org/lkml/CALxfFW4BXhEwxR0Q5LSkg-8Vb4r2MONKCcUCVioehXQKr35eHg@mail.gmail.com/
because uid/gid parsing will fail before any assignment in most
filesystems.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Link: https://lore.kernel.org/r/de859d0a-feb9-473d-a5e2-c195a3d47abb@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Documentation/filesystems/mount_api.rst
fs/fs_parser.c
include/linux/fs_parser.h