aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index f997ec0c1ba4..cf2baeb70462 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1050,7 +1050,8 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans,
1050 break; 1050 break;
1051 1051
1052 ret = btrfs_del_item(trans, root, path); 1052 ret = btrfs_del_item(trans, root, path);
1053 BUG_ON(ret); 1053 if (ret)
1054 goto out;
1054 1055
1055 btrfs_release_path(root, path); 1056 btrfs_release_path(root, path);
1056 inode = read_one_inode(root, key.offset); 1057 inode = read_one_inode(root, key.offset);
@@ -1068,8 +1069,10 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans,
1068 */ 1069 */
1069 key.offset = (u64)-1; 1070 key.offset = (u64)-1;
1070 } 1071 }
1072 ret = 0;
1073out:
1071 btrfs_release_path(root, path); 1074 btrfs_release_path(root, path);
1072 return 0; 1075 return ret;
1073} 1076}
1074 1077
1075 1078
@@ -2587,7 +2590,8 @@ static int drop_objectid_items(struct btrfs_trans_handle *trans,
2587 break; 2590 break;
2588 2591
2589 ret = btrfs_del_item(trans, log, path); 2592 ret = btrfs_del_item(trans, log, path);
2590 BUG_ON(ret); 2593 if (ret)
2594 break;
2591 btrfs_release_path(log, path); 2595 btrfs_release_path(log, path);
2592 } 2596 }
2593 btrfs_release_path(log, path); 2597 btrfs_release_path(log, path);