Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b7e2041e
Commit
b7e2041e
authored
Jan 14, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'vhost-net' of
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
parents
92d76e81
0174b0c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
drivers/vhost/vhost.c
drivers/vhost/vhost.c
+11
-7
No files found.
drivers/vhost/vhost.c
View file @
b7e2041e
...
...
@@ -97,22 +97,26 @@ void vhost_poll_stop(struct vhost_poll *poll)
remove_wait_queue
(
poll
->
wqh
,
&
poll
->
wait
);
}
static
bool
vhost_work_seq_done
(
struct
vhost_dev
*
dev
,
struct
vhost_work
*
work
,
unsigned
seq
)
{
int
left
;
spin_lock_irq
(
&
dev
->
work_lock
);
left
=
seq
-
work
->
done_seq
;
spin_unlock_irq
(
&
dev
->
work_lock
);
return
left
<=
0
;
}
static
void
vhost_work_flush
(
struct
vhost_dev
*
dev
,
struct
vhost_work
*
work
)
{
unsigned
seq
;
int
left
;
int
flushing
;
spin_lock_irq
(
&
dev
->
work_lock
);
seq
=
work
->
queue_seq
;
work
->
flushing
++
;
spin_unlock_irq
(
&
dev
->
work_lock
);
wait_event
(
work
->
done
,
({
spin_lock_irq
(
&
dev
->
work_lock
);
left
=
seq
-
work
->
done_seq
<=
0
;
spin_unlock_irq
(
&
dev
->
work_lock
);
left
;
}));
wait_event
(
work
->
done
,
vhost_work_seq_done
(
dev
,
work
,
seq
));
spin_lock_irq
(
&
dev
->
work_lock
);
flushing
=
--
work
->
flushing
;
spin_unlock_irq
(
&
dev
->
work_lock
);
...
...
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