Re: 2.6.5-rc1-mm1
From: Andrew Morton
Date: Mon Mar 22 2004 - 22:38:23 EST
piotr@xxxxxxxxxx (Pedro Larroy) wrote:
>
> On Mon, Mar 22, 2004 at 07:33:27AM -0800, Andrew Morton wrote:
> > piotr@xxxxxxxxxx (Pedro Larroy) wrote:
> > >
> > > Where would kernel leaked ram be accounted?
> >
> > /proc/meminfo, /proc/vmstat and /proc/slabinfo. Also sysrq-M.
A memory leak was introduced in the ext3 changes.
25-akpm/fs/jbd/commit.c | 8 ++++++++
1 files changed, 8 insertions(+)
diff -puN fs/jbd/commit.c~jbd-move-locked-buffers-leak-fixes fs/jbd/commit.c
--- 25/fs/jbd/commit.c~jbd-move-locked-buffers-leak-fixes 2004-03-22 19:34:37.492865816 -0800
+++ 25-akpm/fs/jbd/commit.c 2004-03-22 19:34:41.987182576 -0800
@@ -296,6 +296,13 @@ write_out_data:
}
}
+ if (bufs) {
+ spin_unlock(&journal->j_list_lock);
+ ll_rw_block(WRITE, bufs, wbuf);
+ journal_brelse_array(wbuf, bufs);
+ spin_lock(&journal->j_list_lock);
+ }
+
/*
* Wait for all previously submitted IO to complete.
*/
@@ -322,6 +329,7 @@ write_out_data:
jh->b_transaction = NULL;
jbd_unlock_bh_state(bh);
journal_remove_journal_head(bh);
+ put_bh(bh);
} else {
jbd_unlock_bh_state(bh);
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/