Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d5bd4f0a
Unverified
Commit
d5bd4f0a
authored
Feb 26, 2018
by
Stéphane Graber
Committed by
GitHub
Feb 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2189 from brauner/2018-02-16/remove_needless_locking
commands: remove mutex from state client list
parents
521c8079
328a3f0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
8 deletions
+0
-8
commands.c
src/lxc/commands.c
+0
-2
commands_utils.c
src/lxc/commands_utils.c
+0
-3
start.c
src/lxc/start.c
+0
-3
No files found.
src/lxc/commands.c
View file @
d5bd4f0a
...
...
@@ -1149,7 +1149,6 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
return
;
}
process_lock
();
lxc_list_for_each_safe
(
cur
,
&
handler
->
conf
->
state_clients
,
next
)
{
client
=
cur
->
elem
;
if
(
client
->
clientfd
!=
fd
)
...
...
@@ -1165,7 +1164,6 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
*/
break
;
}
process_unlock
();
}
static
int
lxc_cmd_handler
(
int
fd
,
uint32_t
events
,
void
*
data
,
...
...
src/lxc/commands_utils.c
View file @
d5bd4f0a
...
...
@@ -211,14 +211,11 @@ int lxc_add_state_client(int state_client_fd, struct lxc_handler *handler,
return
-
ENOMEM
;
}
process_lock
();
state
=
handler
->
state
;
if
(
states
[
state
]
!=
1
)
{
lxc_list_add_elem
(
tmplist
,
newclient
);
lxc_list_add_tail
(
&
handler
->
conf
->
state_clients
,
tmplist
);
process_unlock
();
}
else
{
process_unlock
();
free
(
newclient
);
free
(
tmplist
);
return
state
;
...
...
src/lxc/start.c
View file @
d5bd4f0a
...
...
@@ -390,7 +390,6 @@ int lxc_serve_state_clients(const char *name, struct lxc_handler *handler,
struct
lxc_state_client
*
client
;
struct
lxc_msg
msg
=
{.
type
=
lxc_msg_state
,
.
value
=
state
};
process_lock
();
if
(
state
==
THAWED
)
handler
->
state
=
RUNNING
;
else
...
...
@@ -400,7 +399,6 @@ int lxc_serve_state_clients(const char *name, struct lxc_handler *handler,
if
(
lxc_list_empty
(
&
handler
->
conf
->
state_clients
))
{
TRACE
(
"No state clients registered"
);
process_unlock
();
return
0
;
}
...
...
@@ -437,7 +435,6 @@ int lxc_serve_state_clients(const char *name, struct lxc_handler *handler,
free
(
cur
->
elem
);
free
(
cur
);
}
process_unlock
();
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment