diff options
| author | Li Zefan <lizf@cn.fujitsu.com> | 2008-07-25 04:46:29 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:32 -0400 |
| commit | 8ef2720397bb813d4985405a5ae7b8ad6474188b (patch) | |
| tree | d96e7aeeff719a658324661301a7c026f11a3263 | |
| parent | fc80c44277b3c92d808b73e9d40e120229aa4b6a (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>
| -rw-r--r-- | fs/ext3/namei.c | 4 |
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) | |||
| 240 | { | 240 | { |
| 241 | unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(1) - | 241 | unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(1) - |
| 242 | EXT3_DIR_REC_LEN(2) - infosize; | 242 | EXT3_DIR_REC_LEN(2) - infosize; |
| 243 | return 0? 20: entry_space / sizeof(struct dx_entry); | 243 | return entry_space / sizeof(struct dx_entry); |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | static inline unsigned dx_node_limit (struct inode *dir) | 246 | static inline unsigned dx_node_limit (struct inode *dir) |
| 247 | { | 247 | { |
| 248 | unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(0); | 248 | unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(0); |
| 249 | return 0? 22: entry_space / sizeof(struct dx_entry); | 249 | return entry_space / sizeof(struct dx_entry); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | /* | 252 | /* |
