diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-03-23 08:14:16 +0000 |
---|---|---|
committer | root <Chris Mason chris.mason@oracle.com> | 2011-03-28 05:37:35 -0400 |
commit | db5b493ac78e46c7b6bad22cd25d8041564cd8ea (patch) | |
tree | 18f484c3d8194b80165e5400831931a3ac5c58ba /fs/btrfs/file-item.c | |
parent | 1abe9b8a138c9988ba8f7bfded6453649a31541f (diff) | |
download | op-kernel-dev-db5b493ac78e46c7b6bad22cd25d8041564cd8ea.zip op-kernel-dev-db5b493ac78e46c7b6bad22cd25d8041564cd8ea.tar.gz |
Btrfs: cleanup some BUG_ON()
This patch changes some BUG_ON() to the error return.
(but, most callers still use 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/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 4f19a3e..a2134195 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -48,7 +48,8 @@ int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, struct extent_buffer *leaf; path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; file_key.objectid = objectid; file_key.offset = pos; btrfs_set_key_type(&file_key, BTRFS_EXTENT_DATA_KEY); |