]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
btrfs: send: remove BUG from process_all_refs
authorDavid Sterba <dsterba@suse.cz>
Mon, 3 Feb 2014 18:24:19 +0000 (19:24 +0100)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:15:47 +0000 (15:15 -0400)
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>
fs/btrfs/send.c

index 4405aae05281fe9689110f78d5e29e56a3100f5e..d3ed9df77422dfb64d2cc0a23d6739f0f69d001c 100644 (file)
@@ -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;