patch-2.1.86 linux/drivers/scsi/sr_ioctl.c

Next file: linux/drivers/scsi/sr_vendor.c
Previous file: linux/drivers/scsi/advansys.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.85/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
@@ -803,6 +803,15 @@
 
     RO_IOCTLS(cdi->dev,arg);
 
+    case BLKFLSBUF:
+	if(!suser())
+		return -EACCES;
+	if(!(cdi->dev))
+		return -EINVAL;
+	fsync_dev(cdi->dev);
+	invalidate_buffers(cdi->dev);
+	return 0;
+
     default:
 	return scsi_ioctl(scsi_CDs[target].device,cmd,(void *) arg);
     }

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