diff options
author | Fengguang Wu <wfg@mail.ustc.edu.cn> | 2007-10-16 01:24:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 09:42:52 -0700 |
commit | f4e6b498d6e06742d72706ef50593a9c4dd72214 (patch) | |
tree | 74a573302b2ea086c0d21907175be604f110f5b1 /fs/ext4/dir.c | |
parent | 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937 (diff) | |
download | kernel_samsung_espresso10-f4e6b498d6e06742d72706ef50593a9c4dd72214.zip kernel_samsung_espresso10-f4e6b498d6e06742d72706ef50593a9c4dd72214.tar.gz kernel_samsung_espresso10-f4e6b498d6e06742d72706ef50593a9c4dd72214.tar.bz2 |
readahead: combine file_ra_state.prev_index/prev_offset into prev_pos
Combine the file_ra_state members
unsigned long prev_index
unsigned int prev_offset
into
loff_t prev_pos
It is more consistent and better supports huge files.
Thanks to Peter for the nice proposal!
[akpm@linux-foundation.org: fix shift overflow]
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext4/dir.c')
-rw-r--r-- | fs/ext4/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 3ab01c0..e11890a 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -142,7 +142,7 @@ static int ext4_readdir(struct file * filp, sb->s_bdev->bd_inode->i_mapping, &filp->f_ra, filp, index, 1); - filp->f_ra.prev_index = index; + filp->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT; bh = ext4_bread(NULL, inode, blk, 0, &err); } |