1 --- a/lib/kobject_uevent.c
2 +++ b/lib/kobject_uevent.c
3 @@ -49,6 +49,18 @@ static const char *kobject_actions[] = {
4 [KOBJ_OFFLINE] = "offline",
7 +u64 uevent_next_seqnum(void)
11 + spin_lock(&sequence_lock);
12 + seq = ++uevent_seqnum;
13 + spin_unlock(&sequence_lock);
17 +EXPORT_SYMBOL_GPL(uevent_next_seqnum);
20 * kobject_action_type - translate action string to numeric type
22 @@ -244,9 +256,7 @@ int kobject_uevent_env(struct kobject *k
23 kobj->state_remove_uevent_sent = 1;
25 /* we will send an event, so request a new sequence number */
26 - spin_lock(&sequence_lock);
27 - seq = ++uevent_seqnum;
28 - spin_unlock(&sequence_lock);
29 + seq = uevent_next_seqnum();
30 retval = add_uevent_var(env, "SEQNUM=%llu", (unsigned long long)seq);