Btrfs: cleanup some BUG_ON()
[deliverable/linux.git] / fs / btrfs / file-item.c
index 4f19a3e1bf328dc39ab763dc6f604095aa5d76c7..a2134195a85ea7893a5a94b5520f9bad7915fdf6 100644 (file)
@@ -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);
This page took 0.028789 seconds and 5 git commands to generate.