summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-02-03 19:24:19 +0100
committerJosef Bacik <jbacik@fb.com>2014-03-10 15:15:47 -0400
commit4d1a63b21b4f77a82efe7d78fc1ae1cc7532691c (patch)
tree63e19bf566d32cbbb2f11d0adfe4577f946117bb /fs/btrfs/send.c
parent1f5a7ff999523e9996befbe03e196eb73370fe36 (diff)
downloadop-kernel-dev-4d1a63b21b4f77a82efe7d78fc1ae1cc7532691c.zip
op-kernel-dev-4d1a63b21b4f77a82efe7d78fc1ae1cc7532691c.tar.gz
btrfs: send: remove BUG from process_all_refs
There are only 2 static callers, the BUG would normally be never reached, but let's be nice. Signed-off-by: David Sterba <dsterba@suse.cz> 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 4405aae..d3ed9df 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -3606,7 +3606,10 @@ static int process_all_refs(struct send_ctx *sctx,
root = sctx->parent_root;
cb = __record_deleted_ref;
} else {
- BUG();
+ btrfs_err(sctx->send_root->fs_info,
+ "Wrong command %d in process_all_refs", cmd);
+ ret = -EINVAL;
+ goto out;
}
key.objectid = sctx->cmp_key->objectid;
OpenPOWER on IntegriCloud