All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: add missing error check in incremental send
@ 2014-01-30 13:27 Filipe David Borba Manana
  0 siblings, 0 replies; only message in thread
From: Filipe David Borba Manana @ 2014-01-30 13:27 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Filipe David Borba Manana

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>
---
 fs/btrfs/send.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 31b76d0..7250d86 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -3215,7 +3215,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;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-30 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 13:27 [PATCH] Btrfs: add missing error check in incremental send Filipe David Borba Manana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.