提交 b3561ea9 编写于 作者: J Jean Delvare 提交者: Linus Torvalds

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: NJean Delvare <khali@linux-fr.org>
Acked-by: NIngo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 97f06784
...@@ -2034,7 +2034,7 @@ zoran_do_ioctl (struct inode *inode, ...@@ -2034,7 +2034,7 @@ zoran_do_ioctl (struct inode *inode,
* but moving the free code outside the munmap() handler fixes * but moving the free code outside the munmap() handler fixes
* all this... If someone knows why, please explain me (Ronald) * 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 */ /* we obtained it! Let's try to free some things */
if (fh->jpg_buffers.ready_to_be_freed) if (fh->jpg_buffers.ready_to_be_freed)
jpg_fbuffer_free(file); jpg_fbuffer_free(file);
......
...@@ -216,7 +216,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) ...@@ -216,7 +216,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
int last_devnum = -1; int last_devnum = -1;
struct gendisk *gd; struct gendisk *gd;
if (!!mutex_trylock(&mtd_table_mutex)) { if (mutex_trylock(&mtd_table_mutex)) {
mutex_unlock(&mtd_table_mutex); mutex_unlock(&mtd_table_mutex);
BUG(); BUG();
} }
...@@ -294,7 +294,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) ...@@ -294,7 +294,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old) 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); mutex_unlock(&mtd_table_mutex);
BUG(); BUG();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册