summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rw-r--r--check/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/check/main.c b/check/main.c
index bc2ee22f..3de997e4 100644
--- a/check/main.c
+++ b/check/main.c
@@ -2735,7 +2735,10 @@ static int check_inode_recs(struct btrfs_root *root,
(unsigned long long)root->objectid);
ret = btrfs_make_root_dir(trans, root, root_dirid);
- BUG_ON(ret);
+ if (ret < 0) {
+ btrfs_abort_transaction(trans, ret);
+ return ret;
+ }
btrfs_commit_transaction(trans, root);
return -EAGAIN;