aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/floppy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r--drivers/block/floppy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 2cea27aba9a0..ae3ef8945f3f 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3761,14 +3761,14 @@ static int floppy_open(struct inode *inode, struct file *filp)
3761 UFDCS->rawcmd = 2; 3761 UFDCS->rawcmd = 2;
3762 3762
3763 if (!(filp->f_flags & O_NDELAY)) { 3763 if (!(filp->f_flags & O_NDELAY)) {
3764 if (filp->f_mode & 3) { 3764 if (filp->f_mode & (FMODE_READ|FMODE_WRITE)) {
3765 UDRS->last_checked = 0; 3765 UDRS->last_checked = 0;
3766 check_disk_change(inode->i_bdev); 3766 check_disk_change(inode->i_bdev);
3767 if (UTESTF(FD_DISK_CHANGED)) 3767 if (UTESTF(FD_DISK_CHANGED))
3768 goto out; 3768 goto out;
3769 } 3769 }
3770 res = -EROFS; 3770 res = -EROFS;
3771 if ((filp->f_mode & 2) && !(UTESTF(FD_DISK_WRITABLE))) 3771 if ((filp->f_mode & FMODE_WRITE) && !(UTESTF(FD_DISK_WRITABLE)))
3772 goto out; 3772 goto out;
3773 } 3773 }
3774 mutex_unlock(&open_lock); 3774 mutex_unlock(&open_lock);