diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2018-05-11 17:49:31 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-20 09:56:13 +0200 |
commit | b8a8824ca011050b590a6353067e722a24a591fb (patch) | |
tree | 7f157970f1237f5913c4b12599e3699bc3a7aa25 /fs/overlayfs/namei.c | |
parent | ovl: Move some dir related ovl_lookup_single() code in else block (diff) | |
download | linux-b8a8824ca011050b590a6353067e722a24a591fb.tar.xz linux-b8a8824ca011050b590a6353067e722a24a591fb.zip |
ovl: Check redirects for metacopy files
Right now we rely on path based lookup for data origin of metacopy upper.
This will work only if upper has not been renamed. We solved this problem
already for merged directories using redirect. Use same logic for metacopy
files.
This patch just goes on to check redirects for metacopy files.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index e4bbe6ed6a87..eddb80dd0766 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -272,7 +272,8 @@ static int ovl_lookup_single(struct dentry *base, struct ovl_lookup_data *d, d->metacopy = err; d->stop = !d->metacopy; - goto out; + if (!d->metacopy || d->last) + goto out; } else { if (last_element) d->is_dir = true; @@ -874,7 +875,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, if (upperdentry && !d.is_dir) { unsigned int origin_ctr = 0; - BUG_ON(d.redirect); /* * Lookup copy up origin by decoding origin file handle. * We may get a disconnected dentry, which is fine, |