summaryrefslogtreecommitdiff
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@gmail.com>2014-01-30 17:27:12 +0400
committerJosef Bacik <jbacik@fb.com>2014-03-10 23:15:40 +0400
commitd86477b303da51832002eec1cdec2938c42fccc3 (patch)
treec8723eec6df985996ca5fbcba168adc2ed350b71 /fs/btrfs/send.c
parentc404e0dc2c843b154f9a36c3aec10d0a715d88eb (diff)
downloadlinux-d86477b303da51832002eec1cdec2938c42fccc3.tar.xz
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: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 9dde9717c1b9..70272e1d2b1e 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -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;