aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>2011-03-01 06:48:31 +0000
committerroot <Chris Mason chris.mason@oracle.com>2011-03-28 05:37:54 -0400
commitc2db1073fdf9757e6fd8b4a59d15b6ecc7a2af8a (patch)
tree024264b2d27f75b967efbde01060ebb8626fa39d /fs/btrfs/file-item.c
parentc59021f846881a957ac5afe456d0f59d6a517b61 (diff)
downloadkernel_samsung_smdk4412-c2db1073fdf9757e6fd8b4a59d15b6ecc7a2af8a.zip
kernel_samsung_smdk4412-c2db1073fdf9757e6fd8b4a59d15b6ecc7a2af8a.tar.gz
kernel_samsung_smdk4412-c2db1073fdf9757e6fd8b4a59d15b6ecc7a2af8a.tar.bz2
Btrfs: check return value of btrfs_alloc_path()
Adding the check on the return value of btrfs_alloc_path() to several places. And, some of callers are modified by this change. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index a213419..a6a9d4e 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -170,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;