[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1411063958-11570-1-git-send-email-fabf@skynet.be>
Date: Thu, 18 Sep 2014 20:12:38 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel@...r.kernel.org
Cc: Fabian Frederick <fabf@...net.be>, reiserfs-devel@...r.kernel.org,
Jeff Mahoney <jeffm@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 1/1] fs/reiserfs/journal.c: fix sparse context imbalance warning
Merge conditional unlock/lock in the same condition to avoid sparse warning:
fs/reiserfs/journal.c:703:36: warning: context imbalance in 'add_to_chunk' - unexpected unlock
Cc: reiserfs-devel@...r.kernel.org
Cc: Jeff Mahoney <jeffm@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
fs/reiserfs/journal.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index a88b1b3..d571e17 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -699,11 +699,13 @@ static int add_to_chunk(struct buffer_chunk *chunk, struct buffer_head *bh,
chunk->bh[chunk->nr++] = bh;
if (chunk->nr >= CHUNK_SIZE) {
ret = 1;
- if (lock)
+ if (lock) {
spin_unlock(lock);
- fn(chunk);
- if (lock)
+ fn(chunk);
spin_lock(lock);
+ } else {
+ fn(chunk);
+ }
}
return ret;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists