Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204006
b: refs/heads/master
c: 9e3d195
h: refs/heads/master
v: v3
  • Loading branch information
Michael S. Tsirkin committed Jul 28, 2010
1 parent 5470a5a commit ba06c9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7926ee38f5c6e0bbebe712304f99a4c67e40f84
refs/heads/master: 9e3d195720d1c8b1e09013185ab8c3b749180fc2
6 changes: 6 additions & 0 deletions trunk/drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/highmem.h>
#include <linux/slab.h>
#include <linux/kthread.h>
#include <linux/cgroup.h>

#include <linux/net.h>
#include <linux/if_packet.h>
Expand Down Expand Up @@ -253,9 +254,14 @@ static long vhost_dev_set_owner(struct vhost_dev *dev)
}

dev->worker = worker;
err = cgroup_attach_task_current_cg(worker);
if (err)
goto err_cgroup;
wake_up_process(worker); /* avoid contributing to loadavg */

return 0;
err_cgroup:
kthread_stop(worker);
err_worker:
if (dev->mm)
mmput(dev->mm);
Expand Down

0 comments on commit ba06c9f

Please sign in to comment.