Commit d9c769b7 authored by Li Zefan's avatar Li Zefan Committed by Theodore Ts'o

ext4: cleanup never-used magic numbers from htree code

dx_root_limit() will had some dead code which forced it to always return
20, and dx_node_limit to always return 22 for debugging purposes.
Remove it.
Acked-by: default avatarAndreas Dilger <adilger@sun.com>
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 9102e4fa
...@@ -241,13 +241,13 @@ static inline unsigned dx_root_limit (struct inode *dir, unsigned infosize) ...@@ -241,13 +241,13 @@ static inline unsigned dx_root_limit (struct inode *dir, unsigned infosize)
{ {
unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(1) - unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(1) -
EXT4_DIR_REC_LEN(2) - infosize; EXT4_DIR_REC_LEN(2) - infosize;
return 0? 20: entry_space / sizeof(struct dx_entry); return entry_space / sizeof(struct dx_entry);
} }
static inline unsigned dx_node_limit (struct inode *dir) static inline unsigned dx_node_limit (struct inode *dir)
{ {
unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0); unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0);
return 0? 22: entry_space / sizeof(struct dx_entry); return entry_space / sizeof(struct dx_entry);
} }
/* /*
......
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