]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/block/ataflop.c
[PATCH] introduce fmode_t, do annotations
[mirror_ubuntu-bionic-kernel.git] / drivers / block / ataflop.c
index 432cf40182916366b71fad0b9c4f8e1131b2ef66..e1db285b72cd60d9c4c5179c48ee6dabb0601f4f 100644 (file)
@@ -1826,9 +1826,9 @@ static int floppy_open( struct inode *inode, struct file *filp )
        if (filp->f_flags & O_NDELAY)
                return 0;
 
-       if (filp->f_mode & 3) {
+       if (filp->f_mode & (FMODE_READ|FMODE_WRITE)) {
                check_disk_change(inode->i_bdev);
-               if (filp->f_mode & 2) {
+               if (filp->f_mode & FMODE_WRITE) {
                        if (p->wpstat) {
                                if (p->ref < 0)
                                        p->ref = 0;