Commit 53d3e207 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs pinned buffer fix

From: Oleg Drokin <green@linuxhacker.ru>

reiserfs shouldn't be holding a ref against a buffer when running
set_blocksize(): it means that truncate_inode_pages() cannot free that page.

Which is not fatal - the page will drift aimlessly down the LRU until the VM
nails it.   But it's better this way.
parent d0821d8b
......@@ -942,6 +942,7 @@ static int read_super_block (struct super_block * s, int offset)
{
struct buffer_head * bh;
struct reiserfs_super_block * rs;
int fs_blocksize;
bh = sb_bread (s, offset / s->s_blocksize);
......@@ -961,8 +962,9 @@ static int read_super_block (struct super_block * s, int offset)
//
// ok, reiserfs signature (old or new) found in at the given offset
//
sb_set_blocksize (s, sb_blocksize(rs));
fs_blocksize = sb_blocksize(rs);
brelse (bh);
sb_set_blocksize (s, fs_blocksize);
bh = sb_bread (s, offset / s->s_blocksize);
if (!bh) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment