diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2020-03-17 15:04:22 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-03-17 15:04:22 +0100 |
commit | 7925dad839e70ab43140e26d6b93e807b5969f05 (patch) | |
tree | 955cf36845ff943fad364846b4b964c9e6a19839 /fs/overlayfs/namei.c | |
parent | 3bb7df928a7dca0ab5ae143ecffbd8859850cd08 (diff) |
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/namei.c')
-rw-r--r-- | fs/overlayfs/namei.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index ed9e129fae04..a5b998a93a24 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -845,7 +845,8 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, if (err) goto out; - if (upperdentry && unlikely(ovl_dentry_remote(upperdentry))) { + if (upperdentry && (upperdentry->d_flags & DCACHE_OP_REAL || + unlikely(ovl_dentry_remote(upperdentry)))) { dput(upperdentry); err = -EREMOTE; goto out; |