mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
[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:
parent
aeb5d72706
commit
86d434dede
9 changed files with 26 additions and 22 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue