summaryrefslogtreecommitdiff
path: root/fs/ext3
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-07-25 01:46:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 10:53:32 -0700
commit8ef2720397bb813d4985405a5ae7b8ad6474188b (patch)
treed96e7aeeff719a658324661301a7c026f11a3263 /fs/ext3
parentfc80c44277b3c92d808b73e9d40e120229aa4b6a (diff)
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 <lizf@cn.fujitsu.com> Acked-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/namei.c4
1 files changed, 2 insertions, 2 deletions
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);
}
/*