public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.28-rc1, more lost patches [6/10]
@ 2004-10-27  9:40 sezeroz
  2004-10-27 10:09 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: sezeroz @ 2004-10-27  9:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: marcelo.tosatti

[-- Attachment #1: Type: text/plain, Size: 118 bytes --]


[6/10] cdrom: If the device is opened O_EXCL but there are
other openers, return busy. From ac/redhat. (by Arjan??)


[-- Attachment #2: cdrom-O_EXCL.patch --]
[-- Type: application/octet-stream, Size: 590 bytes --]


from -ac / redhat
location of code moved upwards a bit

diff -urN 28rc1/drivers/cdrom/cdrom.c 28rc1_aac/drivers/cdrom/cdrom.c
--- 28rc1/drivers/cdrom/cdrom.c	2003-11-28 20:26:20.000000000 +0200
+++ 28rc1_aac/drivers/cdrom/cdrom.c	2004-10-24 00:58:09.000000000 +0300
@@ -465,6 +465,10 @@
 	if ((cdi = cdrom_find_device(dev)) == NULL)
 		return -ENODEV;
 
+	/* If the device is opened O_EXCL but there are other openers, return busy */
+	if ( (fp->f_flags & O_EXCL) && (cdi->use_count>0) )
+		return -EBUSY;
+
 	if ((fp->f_mode & FMODE_WRITE) && !CDROM_CAN(CDC_DVD_RAM))
 		return -EROFS;
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-27 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27  9:40 2.4.28-rc1, more lost patches [6/10] sezeroz
2004-10-27 10:09 ` Arjan van de Ven
2004-10-27 12:47   ` O.Sezer
2004-10-27 13:01     ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox