diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-11-05 00:14:04 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-11-05 00:14:04 -0500 |
commit | 498e5f24158da7bf8fa48074a70e370e22844492 (patch) | |
tree | 1434b349c8eca3b0667af0b385533cbcd599c1c3 /fs/ext4/dir.c | |
parent | a9df9a49102f3578909cba7bd33784eb3b9caaa4 (diff) |
ext4: Change unsigned long to unsigned int
Convert the unsigned longs that are most responsible for bloating the
stack usage on 64-bit systems.
Nearly all places in the ext3/4 code which uses "unsigned long" is
probably a bug, since on 32-bit systems a ulong a 32-bits, which means
we are wasting stack space on 64-bit systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/dir.c')
-rw-r--r-- | fs/ext4/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index fed5b610df5a..cf3ccf4a94b0 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c | |||
@@ -64,7 +64,7 @@ static unsigned char get_dtype(struct super_block *sb, int filetype) | |||
64 | int ext4_check_dir_entry(const char *function, struct inode *dir, | 64 | int ext4_check_dir_entry(const char *function, struct inode *dir, |
65 | struct ext4_dir_entry_2 *de, | 65 | struct ext4_dir_entry_2 *de, |
66 | struct buffer_head *bh, | 66 | struct buffer_head *bh, |
67 | unsigned long offset) | 67 | unsigned int offset) |
68 | { | 68 | { |
69 | const char *error_msg = NULL; | 69 | const char *error_msg = NULL; |
70 | const int rlen = ext4_rec_len_from_disk(de->rec_len); | 70 | const int rlen = ext4_rec_len_from_disk(de->rec_len); |
@@ -84,9 +84,9 @@ int ext4_check_dir_entry(const char *function, struct inode *dir, | |||
84 | if (error_msg != NULL) | 84 | if (error_msg != NULL) |
85 | ext4_error(dir->i_sb, function, | 85 | ext4_error(dir->i_sb, function, |
86 | "bad entry in directory #%lu: %s - " | 86 | "bad entry in directory #%lu: %s - " |
87 | "offset=%lu, inode=%lu, rec_len=%d, name_len=%d", | 87 | "offset=%u, inode=%u, rec_len=%d, name_len=%d", |
88 | dir->i_ino, error_msg, offset, | 88 | dir->i_ino, error_msg, offset, |
89 | (unsigned long) le32_to_cpu(de->inode), | 89 | le32_to_cpu(de->inode), |
90 | rlen, de->name_len); | 90 | rlen, de->name_len); |
91 | return error_msg == NULL ? 1 : 0; | 91 | return error_msg == NULL ? 1 : 0; |
92 | } | 92 | } |
@@ -95,7 +95,7 @@ static int ext4_readdir(struct file *filp, | |||
95 | void *dirent, filldir_t filldir) | 95 | void *dirent, filldir_t filldir) |
96 | { | 96 | { |
97 | int error = 0; | 97 | int error = 0; |
98 | unsigned long offset; | 98 | unsigned int offset; |
99 | int i, stored; | 99 | int i, stored; |
100 | struct ext4_dir_entry_2 *de; | 100 | struct ext4_dir_entry_2 *de; |
101 | struct super_block *sb; | 101 | struct super_block *sb; |