]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/block_dev.c
[PATCH] eliminate use of ->f_flags in block methods
[linux-2.6-omap-h63xx.git] / fs / block_dev.c
index 8897f3b02e9894330e57917d0197669aceaeed68..b9022694e9f7bc68bd8760db8c7b7bd63f84d796 100644 (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;