aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>2011-05-19 00:37:44 -0400
committerChris Mason <chris.mason@oracle.com>2011-05-23 13:24:39 -0400
commit65a246c5ffe3b487a001de025816326939e63362 (patch)
tree52da5b08a584ac3178f8bd35a5e7333f5a3908e1 /fs/btrfs/volumes.c
parentb0b802d7e34b0b4a78f911c3a8aad88aa91fd7ab (diff)
Btrfs: return error code to caller when btrfs_del_item fails
The error code is returned instead of calling BUG_ON when btrfs_del_item returns the error. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index e40cdd5b4669..deca1a0326ad 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -967,7 +967,6 @@ static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans,
967 if (device->bytes_used > 0) 967 if (device->bytes_used > 0)
968 device->bytes_used -= btrfs_dev_extent_length(leaf, extent); 968 device->bytes_used -= btrfs_dev_extent_length(leaf, extent);
969 ret = btrfs_del_item(trans, root, path); 969 ret = btrfs_del_item(trans, root, path);
970 BUG_ON(ret);
971 970
972out: 971out:
973 btrfs_free_path(path); 972 btrfs_free_path(path);
@@ -1770,10 +1769,9 @@ static int btrfs_free_chunk(struct btrfs_trans_handle *trans,
1770 BUG_ON(ret); 1769 BUG_ON(ret);
1771 1770
1772 ret = btrfs_del_item(trans, root, path); 1771 ret = btrfs_del_item(trans, root, path);
1773 BUG_ON(ret);
1774 1772
1775 btrfs_free_path(path); 1773 btrfs_free_path(path);
1776 return 0; 1774 return ret;
1777} 1775}
1778 1776
1779static int btrfs_del_sys_chunk(struct btrfs_root *root, u64 chunk_objectid, u64 1777static int btrfs_del_sys_chunk(struct btrfs_root *root, u64 chunk_objectid, u64