提交 425b5daf 编写于 作者: F Filipe Manana 提交者: Chris Mason

Btrfs: remove unnecessary inode generation lookup in send

No need to search in the send tree for the generation number of the inode,
we already have it in the recorded_ref structure passed to us.
Signed-off-by: NFilipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: NLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 21543bad
......@@ -3179,7 +3179,7 @@ static int wait_for_parent_move(struct send_ctx *sctx,
int ret;
u64 ino = parent_ref->dir;
u64 parent_ino_before, parent_ino_after;
u64 new_gen, old_gen;
u64 old_gen;
struct fs_path *path_before = NULL;
struct fs_path *path_after = NULL;
int len1, len2;
......@@ -3197,12 +3197,7 @@ static int wait_for_parent_move(struct send_ctx *sctx,
else if (ret < 0)
return ret;
ret = get_inode_info(sctx->send_root, ino, NULL, &new_gen,
NULL, NULL, NULL, NULL);
if (ret < 0)
return ret;
if (new_gen != old_gen)
if (parent_ref->dir_gen != old_gen)
return 0;
path_before = fs_path_alloc();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册