Commit 9979ead5 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] fs/hfsplus/: remove the hfsplus_inode_check() debug function

This patch removes the hfsplus_inode_check() debug function.

It also removes the now obsolete last_inode_cnt and inode_cnt from struct
hfsplus_sb_info.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Acked-by: default avatarRoman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f346f4b3
...@@ -143,9 +143,6 @@ struct hfsplus_sb_info { ...@@ -143,9 +143,6 @@ struct hfsplus_sb_info {
unsigned long flags; unsigned long flags;
atomic_t inode_cnt;
u32 last_inode_cnt;
struct hlist_head rsrc_inodes; struct hlist_head rsrc_inodes;
}; };
......
...@@ -182,11 +182,6 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent ...@@ -182,11 +182,6 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent
igrab(dir); igrab(dir);
hlist_add_head(&inode->i_hash, &HFSPLUS_SB(sb).rsrc_inodes); hlist_add_head(&inode->i_hash, &HFSPLUS_SB(sb).rsrc_inodes);
mark_inode_dirty(inode); mark_inode_dirty(inode);
{
void hfsplus_inode_check(struct super_block *sb);
atomic_inc(&HFSPLUS_SB(sb).inode_cnt);
hfsplus_inode_check(sb);
}
out: out:
d_add(dentry, inode); d_add(dentry, inode);
return NULL; return NULL;
...@@ -317,11 +312,6 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode) ...@@ -317,11 +312,6 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode)
if (!inode) if (!inode)
return NULL; return NULL;
{
void hfsplus_inode_check(struct super_block *sb);
atomic_inc(&HFSPLUS_SB(sb).inode_cnt);
hfsplus_inode_check(sb);
}
inode->i_ino = HFSPLUS_SB(sb).next_cnid++; inode->i_ino = HFSPLUS_SB(sb).next_cnid++;
inode->i_mode = mode; inode->i_mode = mode;
inode->i_uid = current->fsuid; inode->i_uid = current->fsuid;
......
...@@ -22,29 +22,12 @@ static void hfsplus_destroy_inode(struct inode *inode); ...@@ -22,29 +22,12 @@ static void hfsplus_destroy_inode(struct inode *inode);
#include "hfsplus_fs.h" #include "hfsplus_fs.h"
void hfsplus_inode_check(struct super_block *sb)
{
#if 0
u32 cnt = atomic_read(&HFSPLUS_SB(sb).inode_cnt);
u32 last_cnt = HFSPLUS_SB(sb).last_inode_cnt;
if (cnt <= (last_cnt / 2) ||
cnt >= (last_cnt * 2)) {
HFSPLUS_SB(sb).last_inode_cnt = cnt;
printk("inode_check: %u,%u,%u\n", cnt, last_cnt,
HFSPLUS_SB(sb).cat_tree ? HFSPLUS_SB(sb).cat_tree->node_hash_cnt : 0);
}
#endif
}
static void hfsplus_read_inode(struct inode *inode) static void hfsplus_read_inode(struct inode *inode)
{ {
struct hfs_find_data fd; struct hfs_find_data fd;
struct hfsplus_vh *vhdr; struct hfsplus_vh *vhdr;
int err; int err;
atomic_inc(&HFSPLUS_SB(inode->i_sb).inode_cnt);
hfsplus_inode_check(inode->i_sb);
INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list); INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list);
init_MUTEX(&HFSPLUS_I(inode).extents_lock); init_MUTEX(&HFSPLUS_I(inode).extents_lock);
HFSPLUS_I(inode).flags = 0; HFSPLUS_I(inode).flags = 0;
...@@ -155,12 +138,10 @@ static int hfsplus_write_inode(struct inode *inode, int unused) ...@@ -155,12 +138,10 @@ static int hfsplus_write_inode(struct inode *inode, int unused)
static void hfsplus_clear_inode(struct inode *inode) static void hfsplus_clear_inode(struct inode *inode)
{ {
dprint(DBG_INODE, "hfsplus_clear_inode: %lu\n", inode->i_ino); dprint(DBG_INODE, "hfsplus_clear_inode: %lu\n", inode->i_ino);
atomic_dec(&HFSPLUS_SB(inode->i_sb).inode_cnt);
if (HFSPLUS_IS_RSRC(inode)) { if (HFSPLUS_IS_RSRC(inode)) {
HFSPLUS_I(HFSPLUS_I(inode).rsrc_inode).rsrc_inode = NULL; HFSPLUS_I(HFSPLUS_I(inode).rsrc_inode).rsrc_inode = NULL;
iput(HFSPLUS_I(inode).rsrc_inode); iput(HFSPLUS_I(inode).rsrc_inode);
} }
hfsplus_inode_check(inode->i_sb);
} }
static void hfsplus_write_super(struct super_block *sb) static void hfsplus_write_super(struct super_block *sb)
......
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