Clean up mutex_trylock noise
Subsystems (2)
PATCH 1/1 Clean up mutex_trylock noise
Ingo Molnar's semaphore to mutex conversions left some noise on a few trylock calls. Clean it up.
Signed-off-by Jean Delvare <[email protected]>
Cc Ingo Molnar <[email protected]>
--- drivers/media/video/zoran_driver.c | 2 +- drivers/mtd/mtd_blkdevs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/video/zoran_driver.c +1 -1
@@ -2034,7 +2034,7 @@ zoran_do_ioctl (struct inode *inode,* but moving the free code outside the munmap() handler fixes * all this... If someone knows why, please explain me (Ronald) */ -if (!!mutex_trylock (&zr->resource_lock)) { +if (mutex_trylock (&zr->resource_lock)) {/* we obtained it! Let's try to free some things */ if (fh->jpg_buffers.ready_to_be_freed)jpg_fbuffer_free (file);
drivers/mtd/mtd_blkdevs.c +2 -2
@@ -236,7 +236,7 @@ int add_mtd_blktrans_dev(struct mtd_blktint last_devnum =-1 ;struct gendisk *gd; -if (!!mutex_trylock (&mtd_table_mutex)) { +if (mutex_trylock (&mtd_table_mutex)) {mutex_unlock (&mtd_table_mutex);BUG (); }
@@ -314,7 +314,7 @@ int add_mtd_blktrans_dev(struct mtd_blktint del_mtd_blktrans_dev (struct mtd_blktrans_dev *old) { -if (!!mutex_trylock (&mtd_table_mutex)) { +if (mutex_trylock (&mtd_table_mutex)) {mutex_unlock (&mtd_table_mutex);BUG (); }
Signature · 1 line
Jean Delvare
Review
Quoted 13 lines · Jean Delvare
Ingo Molnar's semaphore to mutex conversions left some noise on a few trylock calls. Clean it up.
Signed-off-by Jean Delvare <[email protected]>(quoted diff) +3
-3- if (!!mutex_trylock(&zr->resource_lock)) { + if (mutex_trylock(&zr->resource_lock)) { - if (!!mutex_trylock(&mtd_table_mutex)) { + if (mutex_trylock(&mtd_table_mutex)) { - if (!!mutex_trylock(&mtd_table_mutex)) { + if (mutex_trylock(&mtd_table_mutex)) {
thanks! That's one of the side-effects of scripted conversions :-/
Acked-by Ingo Molnar <[email protected]>
Ingo