linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/reiserfs/journal.c: add missing brelse
@ 2012-05-03 14:12 Julia Lawall
  2012-05-03 14:45 ` Edward Shishkin
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2012-05-03 14:12 UTC (permalink / raw)
  To: reiserfs-devel; +Cc: kernel-janitors, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>

Brelse is called to put bhjh on every way out of the function except this one.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 fs/reiserfs/journal.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index b1a0857..1ef9cbc 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -2757,8 +2757,10 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
 	    le32_to_cpu(jh->jh_journal.jp_journal_max_commit_age);
 	journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE;
 
-	if (check_advise_trans_params(sb, journal) != 0)
+	if (check_advise_trans_params(sb, journal) != 0) {
+		brelse(bhjh);
 	        goto free_and_return;
+	}
 	journal->j_default_max_commit_age = journal->j_max_commit_age;
 
 	if (commit_max_age != 0) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-03 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-03 14:12 [PATCH] fs/reiserfs/journal.c: add missing brelse Julia Lawall
2012-05-03 14:45 ` Edward Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).