Skip to content

Commit

Permalink
Clean up mutex_trylock noise
Browse files Browse the repository at this point in the history
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]>
Acked-by: Ingo Molnar <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jean Delvare authored and Linus Torvalds committed May 8, 2007
1 parent 97f0678 commit b3561ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/media/video/zoran_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
int last_devnum = -1;
struct gendisk *gd;

if (!!mutex_trylock(&mtd_table_mutex)) {
if (mutex_trylock(&mtd_table_mutex)) {
mutex_unlock(&mtd_table_mutex);
BUG();
}
Expand Down Expand Up @@ -294,7 +294,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)

int 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();
}
Expand Down

0 comments on commit b3561ea

Please sign in to comment.