summaryrefslogtreecommitdiff
path: root/drivers/block/ataflop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/ataflop.c')
-rw-r--r--drivers/block/ataflop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index e1db285b72cd..85d56a26f7c6 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -1813,17 +1813,17 @@ static int floppy_open( struct inode *inode, struct file *filp )
if (p->ref && p->type != type)
return -EBUSY;
- if (p->ref == -1 || (p->ref && filp->f_flags & O_EXCL))
+ if (p->ref == -1 || (p->ref && filp->f_mode & FMODE_EXCL))
return -EBUSY;
- if (filp->f_flags & O_EXCL)
+ if (filp->f_mode & FMODE_EXCL)
p->ref = -1;
else
p->ref++;
p->type = type;
- if (filp->f_flags & O_NDELAY)
+ if (filp->f_mode & FMODE_NDELAY)
return 0;
if (filp->f_mode & (FMODE_READ|FMODE_WRITE)) {