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 46b7b57..c2d8875 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