]> www.infradead.org Git - users/dwmw2/linux.git/commit
ecryptfs: Factor out mount option validation
authorEric Sandeen <sandeen@redhat.com>
Mon, 28 Oct 2024 14:32:38 +0000 (09:32 -0500)
committerChristian Brauner <brauner@kernel.org>
Fri, 15 Nov 2024 10:50:13 +0000 (11:50 +0100)
commit56bd06c2640b78cef985159e03f42bf3897013ff
tree8037acc83a0414012c7f76a4f5e44799ec316940
parentb4201b51d93eac77f772298a96bfedbdb0c7150c
ecryptfs: Factor out mount option validation

Under the new mount API, mount options are parsed one at a time.
Any validation that examines multiple options must be done after parsing
is complete, so factor out a ecryptfs_validate_options() which can be
called separately.

To facilitate this, temporarily move the local variables that tracked
whether various options have been set in the parsing function, into the
ecryptfs_mount_crypt_stat structure so that they can be examined later.

These will be moved to a more ephemeral struct in the mount api conversion
patch to follow.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Link: https://lore.kernel.org/r/20241028143359.605061-2-sandeen@redhat.com
Acked-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/main.c