Commit 34cb9226 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Remove ext3's buffer_head cache

Removes ext3's open-coded inode and allocation bitmap LRUs.

This patch includes a cleanup to ext3_new_block().  The local variables
`bh', `bh2', `i', `j', `k' and `tmp' have been renamed to something
more palatable.
parent 7ef751c5
This diff is collapsed.
This diff is collapsed.
......@@ -417,10 +417,6 @@ void ext3_put_super (struct super_block * sb)
for (i = 0; i < sbi->s_gdb_count; i++)
brelse(sbi->s_group_desc[i]);
kfree(sbi->s_group_desc);
for (i = 0; i < EXT3_MAX_GROUP_LOADED; i++)
brelse(sbi->s_inode_bitmap[i]);
for (i = 0; i < EXT3_MAX_GROUP_LOADED; i++)
brelse(sbi->s_block_bitmap[i]);
brelse(sbi->s_sbh);
/* Debugging code just in case the in-memory inode orphan list
......@@ -1150,14 +1146,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
printk (KERN_ERR "EXT3-fs: group descriptors corrupted !\n");
goto failed_mount2;
}
for (i = 0; i < EXT3_MAX_GROUP_LOADED; i++) {
sbi->s_inode_bitmap_number[i] = 0;
sbi->s_inode_bitmap[i] = NULL;
sbi->s_block_bitmap_number[i] = 0;
sbi->s_block_bitmap[i] = NULL;
}
sbi->s_loaded_inode_bitmaps = 0;
sbi->s_loaded_block_bitmaps = 0;
sbi->s_gdb_count = db_count;
/*
* set up enough so that it can read an inode
......
......@@ -21,14 +21,6 @@
#include <linux/wait.h>
#endif
/*
* The following is not needed anymore since the descriptors buffer
* heads are now dynamically allocated
*/
/* #define EXT3_MAX_GROUP_DESC 8 */
#define EXT3_MAX_GROUP_LOADED 8
/*
* third extended-fs super-block data in memory
*/
......@@ -46,12 +38,6 @@ struct ext3_sb_info {
struct buffer_head * s_sbh; /* Buffer containing the super block */
struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */
struct buffer_head ** s_group_desc;
unsigned short s_loaded_inode_bitmaps;
unsigned short s_loaded_block_bitmaps;
unsigned long s_inode_bitmap_number[EXT3_MAX_GROUP_LOADED];
struct buffer_head * s_inode_bitmap[EXT3_MAX_GROUP_LOADED];
unsigned long s_block_bitmap_number[EXT3_MAX_GROUP_LOADED];
struct buffer_head * s_block_bitmap[EXT3_MAX_GROUP_LOADED];
unsigned long s_mount_opt;
uid_t s_resuid;
gid_t s_resgid;
......
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