summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>2011-01-05 02:32:22 +0000
committerChris Mason <chris.mason@oracle.com>2011-01-16 11:30:20 -0500
commit91ca338d776e0cefb255bf2979b6448febd880f5 (patch)
tree5d1d344d6ed565faf5612b5c695f00c04e6f01d8 /fs/btrfs/extent_io.c
parentff175d57f057f77d2d3031d674c2af9167a4af02 (diff)
downloadlinux-91ca338d776e0cefb255bf2979b6448febd880f5.tar.gz
linux-91ca338d776e0cefb255bf2979b6448febd880f5.tar.bz2
linux-91ca338d776e0cefb255bf2979b6448febd880f5.zip
btrfs: check NULL or not
Should check if functions returns NULL or not. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f1d198128959..8b8d3d99ae68 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3075,6 +3075,8 @@ static struct extent_buffer *__alloc_extent_buffer(struct extent_io_tree *tree,
#endif
eb = kmem_cache_zalloc(extent_buffer_cache, mask);
+ if (eb == NULL)
+ return NULL;
eb->start = start;
eb->len = len;
spin_lock_init(&eb->lock);