[PATCH] SRCU: report out-of-memory errors
[linux-2.6-block.git] / kernel / sys.c
index fd5c710067754ffba439ef1252162e3a357c2d8b..98489d82801be030cb3477589ed952291e19eb7e 100644 (file)
@@ -517,7 +517,8 @@ EXPORT_SYMBOL_GPL(srcu_notifier_call_chain);
 void srcu_init_notifier_head(struct srcu_notifier_head *nh)
 {
        mutex_init(&nh->mutex);
-       init_srcu_struct(&nh->srcu);
+       if (init_srcu_struct(&nh->srcu) < 0)
+               BUG();
        nh->head = NULL;
 }