diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 4405aae05281fe9689110f78d5e29e56a3100f5e..d3ed9df77422dfb64d2cc0a23d6739f0f69d001c 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;