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/root-tree.c | |
parent | b0b802d7e34b0b4a78f911c3a8aad88aa91fd7ab (diff) | |
download | blackbird-op-linux-65a246c5ffe3b487a001de025816326939e63362.tar.gz blackbird-op-linux-65a246c5ffe3b487a001de025816326939e63362.zip |
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/root-tree.c')
-rw-r--r-- | fs/btrfs/root-tree.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 6928bff62daa..2cf5f5142159 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -385,7 +385,10 @@ again: *sequence = btrfs_root_ref_sequence(leaf, ref); ret = btrfs_del_item(trans, tree_root, path); - BUG_ON(ret); + if (ret) { + err = ret; + goto out; + } } else err = -ENOENT; @@ -397,6 +400,7 @@ again: goto again; } +out: btrfs_free_path(path); return err; } |