aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4/dir.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 22:43:38 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 22:43:38 +1100
commit8cd226ca3f64f28c8123ebfaa6afe8dc8c18b174 (patch)
tree6a668a8e899dca090ded0d3b8d6badda8f97d1b0 /fs/ext4/dir.c
parent6b11d8179d1c6e560edc02c40a53b65fde83bf3f (diff)
parent4019191be7316ed4a39e1c1c2b623baa7dc6c843 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (50 commits) jbd2: sparse pointer use of zero as null jbd2: Use round-jiffies() function for the "5 second" ext4/jbd2 wakeup jbd2: Mark jbd2 slabs as SLAB_TEMPORARY jbd2: add lockdep support ext4: Use the ext4_ext_actual_len() helper function ext4: fix uniniatilized extent splitting error ext4: Check for return value from sb_set_blocksize ext4: Add stripe= option to /proc/mounts ext4: Enable the multiblock allocator by default ext4: Add multi block allocator for ext4 ext4: Add new functions for searching extent tree ext4: Add ext4_find_next_bit() ext4: fix up EXT4FS_DEBUG builds ext4: Fix ext4_show_options to show the correct mount options. ext4: Add EXT4_IOC_MIGRATE ioctl ext4: Add inode version support in ext4 vfs: Add 64 bit i_version support ext4: Add the journal checksum feature jbd2: jbd2 stats through procfs ext4: Take read lock during overwrite case. ...
Diffstat (limited to 'fs/ext4/dir.c')
-rw-r--r--fs/ext4/dir.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index f612bef9831..33888bb5814 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -67,7 +67,7 @@ int ext4_check_dir_entry (const char * function, struct inode * dir,
unsigned long offset)
{
const char * error_msg = NULL;
- const int rlen = le16_to_cpu(de->rec_len);
+ const int rlen = ext4_rec_len_from_disk(de->rec_len);
if (rlen < EXT4_DIR_REC_LEN(1))
error_msg = "rec_len is smaller than minimal";
@@ -124,7 +124,7 @@ static int ext4_readdir(struct file * filp,
offset = filp->f_pos & (sb->s_blocksize - 1);
while (!error && !stored && filp->f_pos < inode->i_size) {
- unsigned long blk = filp->f_pos >> EXT4_BLOCK_SIZE_BITS(sb);
+ ext4_lblk_t blk = filp->f_pos >> EXT4_BLOCK_SIZE_BITS(sb);
struct buffer_head map_bh;
struct buffer_head *bh = NULL;
@@ -172,10 +172,10 @@ revalidate:
* least that it is non-zero. A
* failure will be detected in the
* dirent test below. */
- if (le16_to_cpu(de->rec_len) <
- EXT4_DIR_REC_LEN(1))
+ if (ext4_rec_len_from_disk(de->rec_len)
+ < EXT4_DIR_REC_LEN(1))
break;
- i += le16_to_cpu(de->rec_len);
+ i += ext4_rec_len_from_disk(de->rec_len);
}
offset = i;
filp->f_pos = (filp->f_pos & ~(sb->s_blocksize - 1))
@@ -197,7 +197,7 @@ revalidate:
ret = stored;
goto out;
}
- offset += le16_to_cpu(de->rec_len);
+ offset += ext4_rec_len_from_disk(de->rec_len);
if (le32_to_cpu(de->inode)) {
/* We might block in the next section
* if the data destination is
@@ -219,7 +219,7 @@ revalidate:
goto revalidate;
stored ++;
}
- filp->f_pos += le16_to_cpu(de->rec_len);
+ filp->f_pos += ext4_rec_len_from_disk(de->rec_len);
}
offset = 0;
brelse (bh);