summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorDing Dinghua <dingdinghua@nrchpc.ac.cn>2011-05-25 17:43:48 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-05-25 17:43:48 -0400
commit3991b4008cb12f3abfe8dbb049b03d1cc39a8440 (patch)
tree44a6de3b438813925a2992c68aed82f0f04ef27b /fs/jbd2
parent1b16da77f90328661fc7e556ad591f9ee6b7ef6a (diff)
downloadlinux-stable-3991b4008cb12f3abfe8dbb049b03d1cc39a8440.tar.gz
linux-stable-3991b4008cb12f3abfe8dbb049b03d1cc39a8440.tar.bz2
linux-stable-3991b4008cb12f3abfe8dbb049b03d1cc39a8440.zip
jbd2: fix a potential leak of a journal_head on an error path
drop jh->b_jcount in error path Signed-off-by: Ding Dinghua <dingdinghua@nrchpc.ac.cn> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 9dfdf010f1df..3eec82d32fd4 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -922,8 +922,8 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
*/
JBUFFER_TRACE(jh, "cancelling revoke");
jbd2_journal_cancel_revoke(handle, jh);
- jbd2_journal_put_journal_head(jh);
out:
+ jbd2_journal_put_journal_head(jh);
return err;
}