From 8e497195cb6817387af87d8f12ef09b4eb168018 Mon Sep 17 00:00:00 2001 From: Alexey Khoroshilov Date: Tue, 28 Jun 2011 00:21:30 +0400 Subject: [PATCH] --- yaml --- r: 274894 b: refs/heads/master c: 51b11e3630672b7ce8793ecf13e5759656edf38a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/jffs2/wbuf.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 771bb8e0822d..9bda23fb0e19 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9786f6e68af00d0988ad7f51fe3fd118be1c30ad +refs/heads/master: 51b11e3630672b7ce8793ecf13e5759656edf38a diff --git a/trunk/fs/jffs2/wbuf.c b/trunk/fs/jffs2/wbuf.c index 4515bea0268f..a10fb24ca6e6 100644 --- a/trunk/fs/jffs2/wbuf.c +++ b/trunk/fs/jffs2/wbuf.c @@ -578,8 +578,7 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) if (!jffs2_is_writebuffered(c)) return 0; - if (mutex_trylock(&c->alloc_sem)) { - mutex_unlock(&c->alloc_sem); + if (!mutex_is_locked(&c->alloc_sem)) { printk(KERN_CRIT "jffs2_flush_wbuf() called with alloc_sem not locked!\n"); BUG(); }