diff options
Diffstat (limited to 'drivers/block/swim3.c')
-rw-r--r-- | drivers/block/swim3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 730ccea78e45..a53ca54bee12 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
@@ -908,13 +908,13 @@ static int floppy_open(struct inode *inode, struct file *filp) | |||
908 | return -EBUSY; | 908 | return -EBUSY; |
909 | 909 | ||
910 | if (err == 0 && (filp->f_flags & O_NDELAY) == 0 | 910 | if (err == 0 && (filp->f_flags & O_NDELAY) == 0 |
911 | && (filp->f_mode & 3)) { | 911 | && (filp->f_mode & (FMODE_READ|FMODE_WRITE))) { |
912 | check_disk_change(inode->i_bdev); | 912 | check_disk_change(inode->i_bdev); |
913 | if (fs->ejected) | 913 | if (fs->ejected) |
914 | err = -ENXIO; | 914 | err = -ENXIO; |
915 | } | 915 | } |
916 | 916 | ||
917 | if (err == 0 && (filp->f_mode & 2)) { | 917 | if (err == 0 && (filp->f_mode & FMODE_WRITE)) { |
918 | if (fs->write_prot < 0) | 918 | if (fs->write_prot < 0) |
919 | fs->write_prot = swim3_readbit(fs, WRITE_PROT); | 919 | fs->write_prot = swim3_readbit(fs, WRITE_PROT); |
920 | if (fs->write_prot) | 920 | if (fs->write_prot) |