Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[cascardo/linux.git] / fs / btrfs / extent_io.c
index f1d1981..2e993cf 100644 (file)
@@ -3075,11 +3075,12 @@ 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);
        init_waitqueue_head(&eb->lock_wq);
-       INIT_RCU_HEAD(&eb->rcu_head);
 
 #if LEAK_DEBUG
        spin_lock_irqsave(&leak_lock, flags);