Commit 773cb4c5 authored by Amir Goldstein's avatar Amir Goldstein Committed by Miklos Szeredi

ovl: prepare to copy up without workdir

With index=on, we copy up lower hardlinks to work dir and move them into
index dir. Fix locking to allow work dir and index dir to be the same
directory.
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 3011645b
...@@ -584,9 +584,10 @@ static int ovl_copy_up_workdir(struct ovl_copy_up_ctx *c) ...@@ -584,9 +584,10 @@ static int ovl_copy_up_workdir(struct ovl_copy_up_ctx *c)
.link = c->link .link = c->link
}; };
err = ovl_lock_rename_workdir(c->workdir, c->destdir); /* workdir and destdir could be the same when copying up to indexdir */
if (err) err = -EIO;
return err; if (lock_rename(c->workdir, c->destdir) != NULL)
goto unlock;
err = ovl_prep_cu_creds(c->dentry, &cc); err = ovl_prep_cu_creds(c->dentry, &cc);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment