light: make lockdep happy

This commit is contained in:
Thomas Schoebel-Theuer 2015-07-02 15:21:55 +02:00
parent 93adf53ed1
commit df7105dfe2
1 changed files with 7 additions and 4 deletions

View File

@ -2067,8 +2067,6 @@ int peer_thread(void *data)
.global_power = {
.button = true,
},
.dent_mutex = __RWSEM_INITIALIZER(tmp_global.dent_mutex),
.brick_mutex = __RWSEM_INITIALIZER(tmp_global.brick_mutex),
.main_event = __WAIT_QUEUE_HEAD_INITIALIZER(tmp_global.main_event),
};
LIST_HEAD(old_list);
@ -2078,6 +2076,9 @@ int peer_thread(void *data)
.cmd_int1 = peer->maxdepth,
};
init_rwsem(&tmp_global.dent_mutex);
init_rwsem(&tmp_global.brick_mutex);
show_vals(peer_pairs, "/mars", "connection-from-");
if (!mars_socket_is_alive(&peer->socket)) {
@ -5541,8 +5542,6 @@ static struct mars_global _global = {
.global_power = {
.button = true,
},
.dent_mutex = __RWSEM_INITIALIZER(_global.dent_mutex),
.brick_mutex = __RWSEM_INITIALIZER(_global.brick_mutex),
.main_event = __WAIT_QUEUE_HEAD_INITIALIZER(_global.main_event),
};
@ -5551,6 +5550,10 @@ static int _main_thread(void *data)
long long last_rollover = jiffies;
char *id = my_id();
int status = 0;
init_rwsem(&_global.dent_mutex);
init_rwsem(&_global.brick_mutex);
mars_global = &_global;
if (!id || strlen(id) < 2) {