summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/ovl_entry.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2023-06-17 08:42:36 +0200
committerAmir Goldstein <amir73il@gmail.com>2023-06-19 13:02:01 +0200
commitaf5f2396b671c9857b113584d4bd43413b39cfdb (patch)
tree13cdda892abb1a6a9229a59ba5ce44206b7a10cb /fs/overlayfs/ovl_entry.h
parentovl: pass ovl_fs to xino helpers (diff)
downloadlinux-af5f2396b671c9857b113584d4bd43413b39cfdb.tar.xz
linux-af5f2396b671c9857b113584d4bd43413b39cfdb.zip
ovl: store enum redirect_mode in config instead of a string
Do all the logic to set the mode during mount options parsing and do not keep the option string around. Use a constant_table to translate from enum redirect mode to string in preperation for new mount api option parsing. The mount option "off" is translated to either "follow" or "nofollow", depending on the "redirect_always_follow" build/module config, so in effect, there are only three possible redirect modes. This results in a minor change to the string that is displayed in show_options() - when redirect_dir is enabled by default and the user mounts with the option "redirect_dir=off", instead of displaying the mode "redirect_dir=off" in show_options(), the displayed mode will be either "redirect_dir=follow" or "redirect_dir=nofollow", depending on the value of "redirect_always_follow" build/module config. The displayed mode reflects the effective mode, so mounting overlayfs again with the dispalyed redirect_dir option will result with the same effective and displayed mode. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'fs/overlayfs/ovl_entry.h')
-rw-r--r--fs/overlayfs/ovl_entry.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/overlayfs/ovl_entry.h b/fs/overlayfs/ovl_entry.h
index 40232b056be8..b4eb0bd5d0b6 100644
--- a/fs/overlayfs/ovl_entry.h
+++ b/fs/overlayfs/ovl_entry.h
@@ -10,9 +10,7 @@ struct ovl_config {
char *upperdir;
char *workdir;
bool default_permissions;
- bool redirect_dir;
- bool redirect_follow;
- const char *redirect_mode;
+ int redirect_mode;
bool index;
bool uuid;
bool nfs_export;