Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7ae0eef7
Commit
7ae0eef7
authored
Oct 21, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Oct 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Fix JBD memory leak
Plug the two-megabyte-per-day memory leak.
parent
9aa379e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
fs/jbd/commit.c
fs/jbd/commit.c
+8
-0
fs/jbd/journal.c
fs/jbd/journal.c
+2
-0
No files found.
fs/jbd/commit.c
View file @
7ae0eef7
...
@@ -172,6 +172,14 @@ void journal_commit_transaction(journal_t *journal)
...
@@ -172,6 +172,14 @@ void journal_commit_transaction(journal_t *journal)
while
(
commit_transaction
->
t_reserved_list
)
{
while
(
commit_transaction
->
t_reserved_list
)
{
jh
=
commit_transaction
->
t_reserved_list
;
jh
=
commit_transaction
->
t_reserved_list
;
JBUFFER_TRACE
(
jh
,
"reserved, unused: refile"
);
JBUFFER_TRACE
(
jh
,
"reserved, unused: refile"
);
/*
* A journal_get_undo_access()+journal_release_buffer() may
* leave undo-committed data.
*/
if
(
jh
->
b_committed_data
)
{
kfree
(
jh
->
b_committed_data
);
jh
->
b_committed_data
=
NULL
;
}
journal_refile_buffer
(
journal
,
jh
);
journal_refile_buffer
(
journal
,
jh
);
}
}
...
...
fs/jbd/journal.c
View file @
7ae0eef7
...
@@ -1729,6 +1729,8 @@ static void __journal_remove_journal_head(struct buffer_head *bh)
...
@@ -1729,6 +1729,8 @@ static void __journal_remove_journal_head(struct buffer_head *bh)
J_ASSERT_BH
(
bh
,
buffer_jbd
(
bh
));
J_ASSERT_BH
(
bh
,
buffer_jbd
(
bh
));
J_ASSERT_BH
(
bh
,
jh2bh
(
jh
)
==
bh
);
J_ASSERT_BH
(
bh
,
jh2bh
(
jh
)
==
bh
);
BUFFER_TRACE
(
bh
,
"remove journal_head"
);
BUFFER_TRACE
(
bh
,
"remove journal_head"
);
J_ASSERT_BH
(
bh
,
!
jh
->
b_frozen_data
);
J_ASSERT_BH
(
bh
,
!
jh
->
b_committed_data
);
bh
->
b_private
=
NULL
;
bh
->
b_private
=
NULL
;
jh
->
b_bh
=
NULL
;
/* debug, really */
jh
->
b_bh
=
NULL
;
/* debug, really */
clear_buffer_jbd
(
bh
);
clear_buffer_jbd
(
bh
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment