[PATCH] Fix the setting of file->f_ra on block-special files
We need to set file->f_ra _after_ calling blkdev_open(), when inode->i_mapping
points at the right thing. And we need to get it from
inode->i_mapping->host->i_mapping too, which represents the underlying device.
Also, don't test for null file->f_mapping in the O_DIRECT checks.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Showing
Please register or sign in to comment