diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2018-03-09 21:44:42 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-04-12 12:04:49 +0200 |
commit | e9b77f90cc2307f6d2457696d3d76288a5df11fc (patch) | |
tree | 7c5fc764d973c2edef71c2b9c4ab995632a243cb /fs/overlayfs/namei.c | |
parent | ovl: lookup in inode cache first when decoding lower file handle (diff) | |
download | linux-e9b77f90cc2307f6d2457696d3d76288a5df11fc.tar.xz linux-e9b77f90cc2307f6d2457696d3d76288a5df11fc.zip |
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; } |