From: Li Zefan Date: Fri, 25 Jul 2008 08:46:29 +0000 (-0700) Subject: ext3: kill 2 useless magic numbers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8ef2720397bb813d4985405a5ae7b8ad6474188b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ext3: kill 2 useless magic numbers dx_root_limit() will never return 20, and I can't figure out what 20 stands for. This function has never changed since htree directory indexing was merged. Similar for dx_node_limit() and the magic 22. Signed-off-by: Li Zefan Acked-by: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 0b8cf80154f1..d282ea870081 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -240,13 +240,13 @@ static inline unsigned dx_root_limit (struct inode *dir, unsigned infosize) { unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(1) - EXT3_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) { unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(0); - return 0? 22: entry_space / sizeof(struct dx_entry); + return entry_space / sizeof(struct dx_entry); } /*