Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8a8824c authored by Vivek Goyal's avatar Vivek Goyal Committed by Miklos Szeredi
Browse files

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: default avatarVivek Goyal <vgoyal@redhat.com>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 0618a816
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -272,6 +272,7 @@ static int ovl_lookup_single(struct dentry *base, struct ovl_lookup_data *d,

		d->metacopy = err;
		d->stop = !d->metacopy;
		if (!d->metacopy || d->last)
			goto out;
	} else {
		if (last_element)
@@ -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,