[PATCH] eliminate use of ->f_flags in block methods

store needed information in f_mode

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2007-08-26 19:50:05 -04:00
parent aeb5d72706
commit 86d434dede
9 changed files with 26 additions and 22 deletions

View file

@ -1007,6 +1007,13 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
return ret;
}
if (file->f_flags & O_NDELAY)
file->f_mode |= FMODE_NDELAY;
if (file->f_flags & O_EXCL)
file->f_mode |= FMODE_EXCL;
if ((file->f_flags & O_ACCMODE) == 3)
file->f_mode |= FMODE_WRITE_IOCTL;
ret = -ENXIO;
file->f_mapping = bdev->bd_inode->i_mapping;