diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-07-19 07:27:20 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-08-01 14:30:42 -0400 |
commit | b532402e4d147e4f409c4e7f50d4413e8450101d (patch) | |
tree | 0c196fd362d03243704a47e69e41c13acd323bd0 /fs/btrfs/extent-tree.c | |
parent | a0f98dde11a1afe9fbf5c98f57968e086e98b6f5 (diff) | |
download | lwn-b532402e4d147e4f409c4e7f50d4413e8450101d.tar.gz lwn-b532402e4d147e4f409c4e7f50d4413e8450101d.zip |
Btrfs: return error to caller when btrfs_unlink() failes
When btrfs_unlink_inode() and btrfs_orphan_add() in btrfs_unlink()
are error, the error code is returned to the caller instead of
BUG_ON().
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 55bddffede73..db2057f262ad 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -7201,7 +7201,8 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, inode = lookup_free_space_inode(root, block_group, path); if (!IS_ERR(inode)) { - btrfs_orphan_add(trans, inode); + ret = btrfs_orphan_add(trans, inode); + BUG_ON(ret); clear_nlink(inode); /* One for the block groups ref */ spin_lock(&block_group->lock); |