From 53d3e207cf839706de3477f85048ec278d7e930e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 18 Nov 2003 08:15:00 -0800 Subject: [PATCH] [PATCH] reiserfs pinned buffer fix From: Oleg Drokin 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. --- fs/reiserfs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index b5926f9117765..da56ee11aa16c 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -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) { -- 2.53.0