X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=kernel%2Fsrcu.c;h=3507cabe963bd453857b68f6bf56b59103d0781d;hb=02a3e59a088749c08b0293ee1535f5bf48f5926c;hp=7e1979f624ba57c904c706855c04fd64ed625b49;hpb=621934ee7ed5b073c7fd638b347e632c53572761;p=safe%2Fjmp%2Flinux-2.6 diff --git a/kernel/srcu.c b/kernel/srcu.c index 7e1979f..3507cab 100644 --- a/kernel/srcu.c +++ b/kernel/srcu.c @@ -42,11 +42,12 @@ * to any other function. Each srcu_struct represents a separate domain * of SRCU protection. */ -void init_srcu_struct(struct srcu_struct *sp) +int init_srcu_struct(struct srcu_struct *sp) { sp->completed = 0; - sp->per_cpu_ref = alloc_percpu(struct srcu_struct_array); mutex_init(&sp->mutex); + sp->per_cpu_ref = alloc_percpu(struct srcu_struct_array); + return (sp->per_cpu_ref ? 0 : -ENOMEM); } /*