Skip to content

Commit

Permalink
Btrfs: add missing error check in incremental send
Browse files Browse the repository at this point in the history
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: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
  • Loading branch information
Filipe David Borba Manana authored and Josef Bacik committed Mar 10, 2014
1 parent c404e0d commit d86477b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d86477b

Please sign in to comment.