mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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! [[email protected]: fix shift overflow] Cc: Peter Zijlstra <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Cc: Rusty Russell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0bb7ba6b9c
commit
f4e6b498d6
6 changed files with 19 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue