]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fat: Convert to new mount api
authorEric Sandeen <sandeen@redhat.com>
Tue, 2 Jul 2024 22:44:27 +0000 (17:44 -0500)
committerChristian Brauner <brauner@kernel.org>
Wed, 3 Jul 2024 08:48:59 +0000 (10:48 +0200)
commit634440b69c7f7c67478bc775f2c6977afd4adc82
treedecdd203ff0912bafc99b13ad2ba0d67bedba04f
parent206d3d8e006c77b8016de586423de37dbff9e6fc
fat: Convert to new mount api

vfat and msdos share a common set of options, with additional, unique
options for each filesystem.

Each filesystem calls common fc initialization and parsing routines,
with an "is_vfat" parameter. For parsing, if the option is not found
in the common parameter_spec, parsing is retried with the fs-specific
parameter_spec.

This patch leaves nls loading to fill_super, so the codepage and charset
options are not validated as they are requested. This matches current
behavior. It would be possible to test-load as each option is parsed,
but that would make i.e.

mount -o "iocharset=nope,iocharset=iso8859-1"

fail, where it does not fail today because only the last iocharset
option is considered.

The obsolete "conv=" option is set up with an enum of acceptable values;
currently invalid "conv=" options are rejected as such, even though the
option is obsolete, so this patch preserves that behavior.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Link: https://lore.kernel.org/r/a9411b02-5f8e-4e1e-90aa-0c032d66c312@redhat.com
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fat/fat.h
fs/fat/inode.c
fs/fat/namei_msdos.c
fs/fat/namei_vfat.c