diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2018-03-09 23:44:42 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-04-12 13:04:49 +0300 |
commit | e9b77f90cc2307f6d2457696d3d76288a5df11fc (patch) | |
tree | 7c5fc764d973c2edef71c2b9c4ab995632a243cb /fs/overlayfs/namei.c | |
parent | 8b58924ad55c3a9fbeddd1a02d09fd29435e50eb (diff) | |
download | linux-e9b77f90cc2307f6d2457696d3d76288a5df11fc.tar.xz |
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.c | 5 |
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; } |