aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-08-26 19:50:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:47:08 -0400
commit86d434dede14108dd917b25af0f29c0cb28b8d18 (patch)
treef69305e5213ac9eab854b8c85a918fd71c106e06 /fs
parentaeb5d727062a0238a2f96c9c380fbd2be4640c6f (diff)
[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>
Diffstat (limited to 'fs')
-rw-r--r--fs/block_dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 8897f3b02e98..b9022694e9f7 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1007,6 +1007,13 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
1007 return ret; 1007 return ret;
1008 } 1008 }
1009 1009
1010 if (file->f_flags & O_NDELAY)
1011 file->f_mode |= FMODE_NDELAY;
1012 if (file->f_flags & O_EXCL)
1013 file->f_mode |= FMODE_EXCL;
1014 if ((file->f_flags & O_ACCMODE) == 3)
1015 file->f_mode |= FMODE_WRITE_IOCTL;
1016
1010 ret = -ENXIO; 1017 ret = -ENXIO;
1011 file->f_mapping = bdev->bd_inode->i_mapping; 1018 file->f_mapping = bdev->bd_inode->i_mapping;
1012 1019