summaryrefslogtreecommitdiff
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2018-05-11 11:49:31 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2018-07-20 09:56:12 +0200
commit0618a816edab6cb46d6d456f2fdff6bb325a4c77 (patch)
tree5eb9465a3afa009ae9c1a4e3d5026717ea44db92 /fs/overlayfs
parent2c3d73589adc6d3450890a6f793e5e8a1ae894e0 (diff)
ovl: Move some dir related ovl_lookup_single() code in else block
Move some directory related code in else block. This is pure code reorganization and no functionality change. Next patch enables redirect processing on metacopy files and needs this change. By keeping non-functional changes in a separate patch, next patch looks much smaller and cleaner. 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')
-rw-r--r--fs/overlayfs/namei.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index 85ab856dd134..e4bbe6ed6a87 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -273,17 +273,18 @@ static int ovl_lookup_single(struct dentry *base, struct ovl_lookup_data *d,
d->metacopy = err;
d->stop = !d->metacopy;
goto out;
- }
- if (last_element)
- d->is_dir = true;
- if (d->last)
- goto out;
-
- if (ovl_is_opaquedir(this)) {
- d->stop = true;
+ } else {
if (last_element)
- d->opaque = true;
- goto out;
+ d->is_dir = true;
+ if (d->last)
+ goto out;
+
+ if (ovl_is_opaquedir(this)) {
+ d->stop = true;
+ if (last_element)
+ d->opaque = true;
+ goto out;
+ }
}
err = ovl_check_redirect(this, d, prelen, post);
if (err)