Btrfs: check return value of btrfs_inc_extent_ref()
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Thu, 28 Apr 2011 09:18:21 +0000 (09:18 +0000)
committerChris Mason <chris.mason@oracle.com>
Mon, 23 May 2011 17:24:40 +0000 (13:24 -0400)
If return value of btrfs_inc_extent_ref() is not 0, BUG() is called.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/tree-log.c

index 46b7b57650ab8aba7731a9a639944750966e08a4..c2d88756640018858964674b71b3c155977cc2a2 100644 (file)
@@ -589,6 +589,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
                                                ins.objectid, ins.offset,
                                                0, root->root_key.objectid,
                                                key->objectid, offset);
+                               BUG_ON(ret);
                        } else {
                                /*
                                 * insert the extent pointer in the extent