patch-2.1.75 linux/drivers/block/swim3.c

Next file: linux/drivers/char/Makefile
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.74/linux/drivers/block/swim3.c linux/drivers/block/swim3.c
@@ -741,8 +741,8 @@
 	struct floppy_state *fs;
 	int err;
 
-	if (((cmd & 0x80) && !suser())
-	    || ((cmd & 0x40) && !(filp && (filp->f_mode & IOCTL_MODE_BIT))))
+	if (((cmd & 0x40) && !(filp && (filp->f_mode & IOCTL_MODE_BIT))) ||
+	    ((cmd & 0x80) && !suser()))
 		return -EPERM;
 
 	fs = &floppy_states[0];

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov