summaryrefslogtreecommitdiff
path: root/fs/overlayfs/super.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-03-17 17:04:22 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2020-03-17 17:04:22 +0300
commit7925dad839e70ab43140e26d6b93e807b5969f05 (patch)
tree955cf36845ff943fad364846b4b964c9e6a19839 /fs/overlayfs/super.c
parent3bb7df928a7dca0ab5ae143ecffbd8859850cd08 (diff)
downloadlinux-7925dad839e70ab43140e26d6b93e807b5969f05.tar.xz
ovl: separate detection of remote upper layer from stacked overlay
Following patch will allow remote as upper layer, but not overlay stacked on upper layer. Separate the two concepts. This patch is doesn't change behavior. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r--fs/overlayfs/super.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index a05bf1179ce0..bc35cd6233ee 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -752,13 +752,13 @@ static int ovl_mount_dir(const char *name, struct path *path)
ovl_unescape(tmp);
err = ovl_mount_dir_noesc(tmp, path);
- if (!err)
- if (ovl_dentry_remote(path->dentry)) {
- pr_err("filesystem on '%s' not supported as upperdir\n",
- tmp);
- path_put_init(path);
- err = -EINVAL;
- }
+ if (!err && (ovl_dentry_remote(path->dentry) ||
+ path->dentry->d_flags & DCACHE_OP_REAL)) {
+ pr_err("filesystem on '%s' not supported as upperdir\n",
+ tmp);
+ path_put_init(path);
+ err = -EINVAL;
+ }
kfree(tmp);
}
return err;