diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-05-19 04:37:44 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-23 13:24:39 -0400 |
commit | 65a246c5ffe3b487a001de025816326939e63362 (patch) | |
tree | 52da5b08a584ac3178f8bd35a5e7333f5a3908e1 /fs/btrfs/tree-log.c | |
parent | b0b802d7e34b0b4a78f911c3a8aad88aa91fd7ab (diff) | |
download | op-kernel-dev-65a246c5ffe3b487a001de025816326939e63362.zip op-kernel-dev-65a246c5ffe3b487a001de025816326939e63362.tar.gz |
Btrfs: return error code to caller when btrfs_del_item fails
The error code is returned instead of calling BUG_ON when
btrfs_del_item returns the error.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f997ec0..cf2baeb 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -1050,7 +1050,8 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans, break; ret = btrfs_del_item(trans, root, path); - BUG_ON(ret); + if (ret) + goto out; btrfs_release_path(root, path); inode = read_one_inode(root, key.offset); @@ -1068,8 +1069,10 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans, */ key.offset = (u64)-1; } + ret = 0; +out: btrfs_release_path(root, path); - return 0; + return ret; } @@ -2587,7 +2590,8 @@ static int drop_objectid_items(struct btrfs_trans_handle *trans, break; ret = btrfs_del_item(trans, log, path); - BUG_ON(ret); + if (ret) + break; btrfs_release_path(log, path); } btrfs_release_path(log, path); |