提交 d86477b3 编写于 作者: F Filipe David Borba Manana 提交者: Josef Bacik

Btrfs: add missing error check in incremental send

Function wait_for_parent_move() returns negative value if an error
happened, 0 if we don't need to wait for the parent's move, and
1 if the wait is needed.
Before this change an error return value was being treated like the
return value 1, which was not correct.
Signed-off-by: NFilipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: NJosef Bacik <jbacik@fb.com>
上级 c404e0dc
......@@ -3227,7 +3227,10 @@ verbose_printk("btrfs: process_recorded_refs %llu\n", sctx->cur_ino);
* dirs, we always have one new and one deleted
* ref. The deleted ref is ignored later.
*/
if (wait_for_parent_move(sctx, cur)) {
ret = wait_for_parent_move(sctx, cur);
if (ret < 0)
goto out;
if (ret) {
ret = add_pending_dir_move(sctx,
cur->dir);
*pending_move = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册