diff options
Diffstat (limited to 'fs/overlayfs/namei.c')
-rw-r--r-- | fs/overlayfs/namei.c | 21 |
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) |