Skip to content

New uid & gid mount option parsing helpers

Eric Sandeen autofs linux-cifs linux-efi linux-ext4 linux-fsdevel linux-mm linux-trace-kernel ntfs3 1 version Applied

Status from this message: Applied to the vfs.mount.api branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14fs_parse: add uid & gid option option parsing helpersDocumentation/filesystems/mount_api.rst fs/fs_parser.c include/linux/fs_parser.h+46 -34 replies
2/14autofs: Convert to new uid/gid option parsing helpersfs/autofs/inode.c+4 -121 reply
3/14debugfs: Convert to new uid/gid option parsing helpersfs/debugfs/inode.c+4 -120 replies
4/14efivarfs: Convert to new uid/gid option parsing helpersfs/efivarfs/super.c+4 -80 replies
5/14exfat: Convert to new uid/gid option parsing helpersfs/exfat/super.c+4 -40 replies
6/14ext4: Convert to new uid/gid option parsing helpersfs/ext4/super.c+4 -180 replies
7/14fuse: Convert to new uid/gid option parsing helpersfs/fuse/inode.c+4 -82 replies
8/14hugetlbfs: Convert to new uid/gid option parsing helpersfs/hugetlbfs/inode.c+4 -80 replies
9/14isofs: Convert to new uid/gid option parsing helpersfs/isofs/inode.c+4 -120 replies
10/14ntfs3: Convert to new uid/gid option parsing helpersfs/ntfs3/super.c+4 -80 replies
11/14tmpfs: Convert to new uid/gid option parsing helpersmm/shmem.c+4 -80 replies
12/14smb: client: Convert to new uid/gid option parsing helpersfs/smb/client/fs_context.c+12 -270 replies
13/14tracefs: Convert to new uid/gid option parsing helpersfs/tracefs/inode.c+4 -121 reply
14/14vboxsf: Convert to new uid/gid option parsing helpersfs/vboxsf/super.c+4 -121 reply

Reviews trailers per patch

3 of 14 patches have a Reviewed-by or Acked-by.

PatchHans de GoedeSteven Rostedt (Google)Ian Kent
1/14
2/14A-b
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14A-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/14] New uid & gid mount 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.

Net effect is a bit of code removal, as well.

Patch 1 is the infrastructure change, then per-fs conversions follow, cc'd as appropriate.

This series is also at
https://git.kernel.org/pub/scm/linux/kernel/git/sandeen/linux.git/log/?h=mount-api-uid-helper

Thanks,
-Eric

 Documentation/filesystems/mount_api.rst |    9 +++++++--
 fs/autofs/inode.c                       |   16 ++++------------
 fs/debugfs/inode.c                      |   16 ++++------------
 fs/efivarfs/super.c                     |   12 ++++--------
 fs/exfat/super.c                        |    8 ++++----
 fs/ext4/super.c                         |   22 ++++------------------
 fs/fs_parser.c                          |   34 ++++++++++++++++++++++++++++++++++
 fs/fuse/inode.c                         |   12 ++++--------
 fs/hugetlbfs/inode.c                    |   12 ++++--------
 fs/isofs/inode.c                        |   16 ++++------------
 fs/ntfs3/super.c                        |   12 ++++--------
 fs/smb/client/fs_context.c              |   39 ++++++++++++---------------------------
 fs/tracefs/inode.c                      |   16 ++++------------
 include/linux/fs_parser.h               |    6 +++++-
 mm/shmem.c                              |   12 ++++--------
 15 files changed, 102 insertions(+), 140 deletions(-)