uml: mconsole mutex conversion

The plug_mem_mutex is already used as a mutex since it's using
DECLARE_MUTEX(), but the underlying construct is still a semaphore .. This
patch switches it over to a struct mutex.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Daniel Walker and committed by Linus Torvalds e98fa281 01ac835f

+4 -3
+4 -3
arch/um/drivers/mconsole_kern.c
··· 17 #include "linux/syscalls.h" 18 #include "linux/utsname.h" 19 #include "linux/workqueue.h" 20 #include "asm/uaccess.h" 21 #include "init.h" 22 #include "irq_kern.h" ··· 361 void *pages[UNPLUGGED_PER_PAGE]; 362 }; 363 364 - static DECLARE_MUTEX(plug_mem_mutex); 365 static unsigned long long unplugged_pages_count = 0; 366 static LIST_HEAD(unplugged_pages); 367 static int unplug_index = UNPLUGGED_PER_PAGE; ··· 397 398 diff /= PAGE_SIZE; 399 400 - down(&plug_mem_mutex); 401 for (i = 0; i < diff; i++) { 402 struct unplugged_pages *unplugged; 403 void *addr; ··· 454 455 err = 0; 456 out_unlock: 457 - up(&plug_mem_mutex); 458 out: 459 return err; 460 }
··· 17 #include "linux/syscalls.h" 18 #include "linux/utsname.h" 19 #include "linux/workqueue.h" 20 + #include "linux/mutex.h" 21 #include "asm/uaccess.h" 22 #include "init.h" 23 #include "irq_kern.h" ··· 360 void *pages[UNPLUGGED_PER_PAGE]; 361 }; 362 363 + static DEFINE_MUTEX(plug_mem_mutex); 364 static unsigned long long unplugged_pages_count = 0; 365 static LIST_HEAD(unplugged_pages); 366 static int unplug_index = UNPLUGGED_PER_PAGE; ··· 396 397 diff /= PAGE_SIZE; 398 399 + mutex_lock(&plug_mem_mutex); 400 for (i = 0; i < diff; i++) { 401 struct unplugged_pages *unplugged; 402 void *addr; ··· 453 454 err = 0; 455 out_unlock: 456 + mutex_unlock(&plug_mem_mutex); 457 out: 458 return err; 459 }