Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38445
b: refs/heads/master
c: e6a9201
h: refs/heads/master
i:
  38443: dea2636
v: v3
  • Loading branch information
Alan Stern authored and Linus Torvalds committed Oct 4, 2006
1 parent e8a525c commit b91b22a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eabc069401bcf45bcc3f19e643017bf761780aa8
refs/heads/master: e6a92013ba458804161c0c5b6d134d82204dc233
2 changes: 1 addition & 1 deletion trunk/include/linux/srcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct srcu_struct {
#define srcu_barrier()
#endif /* #else #ifndef CONFIG_PREEMPT */

void init_srcu_struct(struct srcu_struct *sp);
int init_srcu_struct(struct srcu_struct *sp);
void cleanup_srcu_struct(struct srcu_struct *sp);
int srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);
Expand Down
5 changes: 3 additions & 2 deletions trunk/kernel/srcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b91b22a

Please sign in to comment.