if (ret < 0)
goto out;
- if (parent_ino == sctx->cur_ino) {
- /* child only renamed, not moved */
- ASSERT(parent_gen == sctx->cur_inode_gen);
- ret = get_cur_path(sctx, sctx->cur_ino, sctx->cur_inode_gen,
- from_path);
- if (ret < 0)
- goto out;
- ret = fs_path_add_path(from_path, name);
- if (ret < 0)
- goto out;
- } else {
- /* child moved and maybe renamed too */
- sctx->send_progress = pm->ino;
- ret = get_cur_path(sctx, pm->ino, pm->gen, from_path);
- if (ret < 0)
- goto out;
- }
+ ret = get_cur_path(sctx, parent_ino, parent_gen,
+ from_path);
+ if (ret < 0)
+ goto out;
+ ret = fs_path_add_path(from_path, name);
+ if (ret < 0)
+ goto out;
- fs_path_free(name);
+ fs_path_reset(name);
+ to_path = name;
name = NULL;
- to_path = fs_path_alloc();
- if (!to_path) {
- ret = -ENOMEM;
- goto out;
- }
-
sctx->send_progress = sctx->cur_ino + 1;
ret = get_cur_path(sctx, pm->ino, pm->gen, to_path);
if (ret < 0)