summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-08-01 20:27:34 +0200
committerChris Mason <chris.mason@oracle.com>2011-08-01 20:27:34 +0200
commitb43b31bdf2e662006c27cc4dcccf863312d62bc1 (patch)
tree9e12413edbd9d7a77e4c0b692dd28ca4ae5039bd /fs/btrfs/file.c
parentMerge branch 'integration' into for-linus (diff)
parentbtrfs: don't BUG_ON allocation errors in btrfs_drop_snapshot (diff)
downloadlinux-b43b31bdf2e662006c27cc4dcccf863312d62bc1.tar.xz
linux-b43b31bdf2e662006c27cc4dcccf863312d62bc1.zip
Merge branch 'alloc_path' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/btrfs-error-handling into for-linus
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 6e56a468d1f5..41ca5fdaee6c 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -855,7 +855,8 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
btrfs_drop_extent_cache(inode, start, end - 1, 0);
path = btrfs_alloc_path();
- BUG_ON(!path);
+ if (!path)
+ return -ENOMEM;
again:
recow = 0;
split = start;