diff options
author | Stoyan Gaydarov <stoyboyker@gmail.com> | 2009-04-02 17:05:11 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-04-02 17:05:11 -0400 |
commit | c293498be69816087746161338de4b81efdf69fc (patch) | |
tree | 32b856b67ca63e2649c8574c9a09352666362ec8 /fs | |
parent | 3e7ad38d20ad113158d1b4c9de0f51c04f50d4f7 (diff) |
Btrfs: BUG to BUG_ON changes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.c | 3 | ||||
-rw-r--r-- | fs/btrfs/free-space-cache.c | 3 | ||||
-rw-r--r-- | fs/btrfs/tree-log.c | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index b8082762ca78..e5b2533b691a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -2157,8 +2157,7 @@ static int insert_ptr(struct btrfs_trans_handle *trans, struct btrfs_root | |||
2157 | BUG_ON(!path->nodes[level]); | 2157 | BUG_ON(!path->nodes[level]); |
2158 | lower = path->nodes[level]; | 2158 | lower = path->nodes[level]; |
2159 | nritems = btrfs_header_nritems(lower); | 2159 | nritems = btrfs_header_nritems(lower); |
2160 | if (slot > nritems) | 2160 | BUG_ON(slot > nritems); |
2161 | BUG(); | ||
2162 | if (nritems == BTRFS_NODEPTRS_PER_BLOCK(root)) | 2161 | if (nritems == BTRFS_NODEPTRS_PER_BLOCK(root)) |
2163 | BUG(); | 2162 | BUG(); |
2164 | if (slot != nritems) { | 2163 | if (slot != nritems) { |
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 3fdadd28e935..768b9523662d 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -253,8 +253,7 @@ int btrfs_add_free_space(struct btrfs_block_group_cache *block_group, | |||
253 | 253 | ||
254 | if (ret) { | 254 | if (ret) { |
255 | printk(KERN_ERR "btrfs: unable to add free space :%d\n", ret); | 255 | printk(KERN_ERR "btrfs: unable to add free space :%d\n", ret); |
256 | if (ret == -EEXIST) | 256 | BUG_ON(ret == -EEXIST); |
257 | BUG(); | ||
258 | } | 257 | } |
259 | 258 | ||
260 | return ret; | 259 | return ret; |
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index c047eea4093f..25f20ea11f27 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -1222,8 +1222,7 @@ insert: | |||
1222 | ret = insert_one_name(trans, root, path, key->objectid, key->offset, | 1222 | ret = insert_one_name(trans, root, path, key->objectid, key->offset, |
1223 | name, name_len, log_type, &log_key); | 1223 | name, name_len, log_type, &log_key); |
1224 | 1224 | ||
1225 | if (ret && ret != -ENOENT) | 1225 | BUG_ON(ret && ret != -ENOENT); |
1226 | BUG(); | ||
1227 | goto out; | 1226 | goto out; |
1228 | } | 1227 | } |
1229 | 1228 | ||