diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-09 10:05:30 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-09 10:05:30 +0200 |
commit | 664cee46e755b37204f1731cb8726db610f3486d (patch) | |
tree | 11ed0d43eff14123534785cf25c0a2143e134e7e /fs/btrfs/file-item.c | |
parent | Merge branch 'fix/asoc' into for-linus (diff) | |
parent | Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/br... (diff) | |
download | linux-664cee46e755b37204f1731cb8726db610f3486d.tar.xz linux-664cee46e755b37204f1731cb8726db610f3486d.zip |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 4f19a3e1bf32..a6a9d4e8b491 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); @@ -169,6 +170,8 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root, struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; path = btrfs_alloc_path(); + if (!path) + return -ENOMEM; if (bio->bi_size > PAGE_CACHE_SIZE * 8) path->reada = 2; |