From f4e6b498d6e06742d72706ef50593a9c4dd72214 Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Tue, 16 Oct 2007 01:24:33 -0700 Subject: 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 Signed-off-by: Fengguang Wu Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ext3/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ext3') diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c index c00723a99f44..c2c3491b18cf 100644 --- a/fs/ext3/dir.c +++ b/fs/ext3/dir.c @@ -143,7 +143,7 @@ static int ext3_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 = ext3_bread(NULL, inode, blk, 0, &err); } -- cgit v1.2.3