[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] linux: proper mutex use in balloon driver
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1171546739 0 # Node ID b3c41b9f01a611d876741ab18cd126722157415c # Parent 89d315c7dceabcad028e061b70f24a1822ed2ea5 linux: proper mutex use in balloon driver Mutexes are supposed to not use the old semaphore technique anymore. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -r 89d315c7dcea -r b3c41b9f01a6 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Thu Feb 15 13:36:58 2007 +0000 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Thu Feb 15 13:38:59 2007 +0000 @@ -60,7 +60,7 @@ static struct proc_dir_entry *balloon_pd static struct proc_dir_entry *balloon_pde; #endif -static DECLARE_MUTEX(balloon_mutex); +static DEFINE_MUTEX(balloon_mutex); /* * Protects atomic reservation decrease/increase against concurrent increases. @@ -321,7 +321,7 @@ static void balloon_process(void *unused int need_sleep = 0; long credit; - down(&balloon_mutex); + mutex_lock(&balloon_mutex); do { credit = current_target() - bs.current_pages; @@ -340,7 +340,7 @@ static void balloon_process(void *unused if (current_target() != bs.current_pages) mod_timer(&balloon_timer, jiffies + HZ); - up(&balloon_mutex); + mutex_unlock(&balloon_mutex); } /* Resets the Xen limit, sets new target, and kicks off processing. */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |