]> git.hungrycats.org Git - linux/commit
[PATCH] Fix the setting of file->f_ra on block-special files
authorAndrew Morton <akpm@osdl.org>
Thu, 27 May 2004 00:35:42 +0000 (17:35 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 27 May 2004 00:35:42 +0000 (17:35 -0700)
commit1c211088833a27daa4512348bcae9890e8cf92d4
tree860b4706aac24db9ac22fc830654ca4b349472a2
parent59a6ce4f0086b52a5e7e8db2c8ed8027e11770e1
[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>
fs/open.c