aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-07-24 12:17:14 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commit8e8a1e31f2780b7865d40a8c5142a04f2bcdcb86 (patch)
tree6fe03f25b1cc33f2c881ffd5e54b7e82335c9098 /fs/btrfs
parent7b1287662304c3cb05cb38f5e3e2d69f386e8f10 (diff)
Btrfs: Fix a few functions that exit without stopping their transaction
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c4
-rw-r--r--fs/btrfs/ioctl.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index f92b297e7da5..e6a3ba9dd107 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3275,8 +3275,10 @@ next:
3275 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); 3275 ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
3276 if (ret > 0) 3276 if (ret > 0)
3277 ret = -EIO; 3277 ret = -EIO;
3278 if (ret < 0) 3278 if (ret < 0) {
3279 btrfs_end_transaction(trans, root);
3279 goto out; 3280 goto out;
3281 }
3280 3282
3281 clear_extent_bits(&info->block_group_cache, key.objectid, 3283 clear_extent_bits(&info->block_group_cache, key.objectid,
3282 key.objectid + key.offset - 1, 3284 key.objectid + key.offset - 1,
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index faf081302d02..7d40778a90e4 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -78,8 +78,10 @@ static noinline int create_subvol(struct btrfs_root *root, char *name,
78 leaf = btrfs_alloc_free_block(trans, root, root->leafsize, 78 leaf = btrfs_alloc_free_block(trans, root, root->leafsize,
79 objectid, trans->transid, 0, 0, 79 objectid, trans->transid, 0, 0,
80 0, 0); 80 0, 0);
81 if (IS_ERR(leaf)) 81 if (IS_ERR(leaf)) {
82 return PTR_ERR(leaf); 82 ret = PTR_ERR(leaf);
83 goto fail;
84 }
83 85
84 btrfs_set_header_nritems(leaf, 0); 86 btrfs_set_header_nritems(leaf, 0);
85 btrfs_set_header_level(leaf, 0); 87 btrfs_set_header_level(leaf, 0);