diff options
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 4e44e865b716..520f9ab0e9ef 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c | |||
@@ -226,6 +226,8 @@ enum { | |||
226 | OPT_UPPERDIR, | 226 | OPT_UPPERDIR, |
227 | OPT_WORKDIR, | 227 | OPT_WORKDIR, |
228 | OPT_DEFAULT_PERMISSIONS, | 228 | OPT_DEFAULT_PERMISSIONS, |
229 | OPT_REDIRECT_DIR_ON, | ||
230 | OPT_REDIRECT_DIR_OFF, | ||
229 | OPT_ERR, | 231 | OPT_ERR, |
230 | }; | 232 | }; |
231 | 233 | ||
@@ -234,6 +236,8 @@ static const match_table_t ovl_tokens = { | |||
234 | {OPT_UPPERDIR, "upperdir=%s"}, | 236 | {OPT_UPPERDIR, "upperdir=%s"}, |
235 | {OPT_WORKDIR, "workdir=%s"}, | 237 | {OPT_WORKDIR, "workdir=%s"}, |
236 | {OPT_DEFAULT_PERMISSIONS, "default_permissions"}, | 238 | {OPT_DEFAULT_PERMISSIONS, "default_permissions"}, |
239 | {OPT_REDIRECT_DIR_ON, "redirect_dir=on"}, | ||
240 | {OPT_REDIRECT_DIR_OFF, "redirect_dir=off"}, | ||
237 | {OPT_ERR, NULL} | 241 | {OPT_ERR, NULL} |
238 | }; | 242 | }; |
239 | 243 | ||
@@ -298,6 +302,14 @@ static int ovl_parse_opt(char *opt, struct ovl_config *config) | |||
298 | config->default_permissions = true; | 302 | config->default_permissions = true; |
299 | break; | 303 | break; |
300 | 304 | ||
305 | case OPT_REDIRECT_DIR_ON: | ||
306 | config->redirect_dir = true; | ||
307 | break; | ||
308 | |||
309 | case OPT_REDIRECT_DIR_OFF: | ||
310 | config->redirect_dir = false; | ||
311 | break; | ||
312 | |||
301 | default: | 313 | default: |
302 | pr_err("overlayfs: unrecognized mount option \"%s\" or missing value\n", p); | 314 | pr_err("overlayfs: unrecognized mount option \"%s\" or missing value\n", p); |
303 | return -EINVAL; | 315 | return -EINVAL; |