diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-07-19 03:27:20 -0400 |
---|---|---|
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) |
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, | |||
7201 | 7201 | ||
7202 | inode = lookup_free_space_inode(root, block_group, path); | 7202 | inode = lookup_free_space_inode(root, block_group, path); |
7203 | if (!IS_ERR(inode)) { | 7203 | if (!IS_ERR(inode)) { |
7204 | btrfs_orphan_add(trans, inode); | 7204 | ret = btrfs_orphan_add(trans, inode); |
7205 | BUG_ON(ret); | ||
7205 | clear_nlink(inode); | 7206 | clear_nlink(inode); |
7206 | /* One for the block groups ref */ | 7207 | /* One for the block groups ref */ |
7207 | spin_lock(&block_group->lock); | 7208 | spin_lock(&block_group->lock); |