ovl: report the requested redirect_dir mode in conflicting options
Subsystems (2)
Amir Goldstein
maintainerPATCH 1/1 ovl: report the requested redirect_dir mode in conflicting options
Since the redirect_dir mode is stored as an enum, "off" is translated to "follow" or "nofollow" when parsing the option and redirect_dir=follow is translated to "on" for a non-upper mount, so the errors about options that conflict with an explicit redirect_dir= report a mode that the user did not request.
Translate "off" when verifying the mount options instead of when parsing them and report the requested mode in those errors.
Fixes af5f2396b671 ("ovl: store enum redirect_mode in config instead of a string")
Signed-off-by Amir Goldstein <[email protected]>
--- fs/overlayfs/overlayfs.h | 10 +++++++--- fs/overlayfs/params.c | 43 ++++++++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 16 deletions(-)
fs/overlayfs/overlayfs.h +7 -3
@@ -76,9 +76,13 @@ enum ovl_entry_flag { };enum { -OVL_REDIRECT_OFF ,/* "off" mode is never used. In effect */ -OVL_REDIRECT_FOLLOW ,/* ...it translates to either "follow" */ -OVL_REDIRECT_NOFOLLOW ,/* ...or "nofollow". */ +/* +* "off" mode is never used after mount options are verified. In effect +* it translates to either "follow" or "nofollow". +*/ +OVL_REDIRECT_OFF , +OVL_REDIRECT_FOLLOW , +OVL_REDIRECT_NOFOLLOW ,OVL_REDIRECT_ON , };
fs/overlayfs/params.c +30 -13
99 lines not on this page · raw message
Signature · 1 line
2.56.0