summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/namei.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2018-03-09 15:44:42 -0500
committerMiklos Szeredi <mszeredi@redhat.com>2018-04-12 12:04:49 +0200
commite9b77f90cc2307f6d2457696d3d76288a5df11fc (patch)
tree7c5fc764d973c2edef71c2b9c4ab995632a243cb /fs/overlayfs/namei.c
parent8b58924ad55c3a9fbeddd1a02d09fd29435e50eb (diff)
downloadlinux-e9b77f90cc2307f6d2457696d3d76288a5df11fc.tar.bz2
ovl: Do not check for redirect if this is last layer
If we are looking in last layer, then there should not be any need to process redirect. redirect information is used only for lookup in next lower layer and there is no more lower layer to look into. So no need to process redirects. IOW, ignore redirects on lowest layer. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/namei.c')
-rw-r--r--fs/overlayfs/namei.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index 810a333d2221..5287c4bcf14b 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -258,7 +258,10 @@ static int ovl_lookup_single(struct dentry *base, struct ovl_lookup_data *d,
goto out;
}
d->is_dir = true;
- if (!d->last && ovl_is_opaquedir(this)) {
+ if (d->last)
+ goto out;
+
+ if (ovl_is_opaquedir(this)) {
d->stop = d->opaque = true;
goto out;
}