summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-02-13 11:24:33 +0000
committerDimitri John Ledkov <xnox@ubuntu.com>2017-02-13 11:24:33 +0000
commit4305d024938113df5d73021a09eb2a991f54ca2f (patch)
treed9e7ecc9db14bcc1394607a9e6c644a8b93e9bea /ctree.c
parente693f0e4ffb1776a05b78264ee3d93d5f07efede (diff)
New upstream release Closes: #849353, #817806, #854915, #845473
Diffstat (limited to 'ctree.c')
-rw-r--r--ctree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ctree.c b/ctree.c
index a98ad185..d07ec7d9 100644
--- a/ctree.c
+++ b/ctree.c
@@ -2580,7 +2580,9 @@ int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root
unsigned long ptr;
path = btrfs_alloc_path();
- BUG_ON(!path);
+ if (!path)
+ return -ENOMEM;
+
ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size);
if (!ret) {
leaf = path->nodes[0];