diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 11:02:57 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 11:02:57 +0100 |
commit | 688ea0e5a0e2278e2fcd0014324ab1ba68e70ad7 (patch) | |
tree | e3e8c4924f694e485253ee5a2b512b30b4bcef7a /fs/overlayfs/super.c | |
parent | d15951198eaccb92c6b49e62cb72f5ff62da2236 (diff) | |
download | linux-stable-688ea0e5a0e2278e2fcd0014324ab1ba68e70ad7.tar.gz linux-stable-688ea0e5a0e2278e2fcd0014324ab1ba68e70ad7.tar.bz2 linux-stable-688ea0e5a0e2278e2fcd0014324ab1ba68e70ad7.zip |
ovl: allow redirect_dir to default to "on"
This patch introduces a kernel config option and a module param. Both can
be used independently to turn the default value of redirect_dir on or off.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 520f9ab0e9ef..2750aef24d16 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -28,6 +28,10 @@ struct ovl_dir_cache; #define OVL_MAX_STACK 500 +static bool ovl_redirect_dir_def = IS_ENABLED(CONFIG_OVERLAY_FS_REDIRECT_DIR); +module_param_named(redirect_dir, ovl_redirect_dir_def, bool, 0644); +MODULE_PARM_DESC(ovl_redirect_dir_def, + "Default to on or off for the redirect_dir feature"); static void ovl_dentry_release(struct dentry *dentry) { @@ -702,6 +706,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) if (!ufs) goto out; + ufs->config.redirect_dir = ovl_redirect_dir_def; err = ovl_parse_opt((char *) data, &ufs->config); if (err) goto out_free_config; |