]> git.pld-linux.org Git - packages/kernel.git/blame - 2.6.0-mount-rainier-fix-EROFS.patch
- ported from linux-2.4.25-atmdd.patch
[packages/kernel.git] / 2.6.0-mount-rainier-fix-EROFS.patch
CommitLineData
30d88ced 1--- linux-2.6.1-rc1/drivers/cdrom/cdrom.c~ 2004-01-05 11:10:12.959452528 +0100
2+++ linux-2.6.1-rc1/drivers/cdrom/cdrom.c 2004-01-05 11:15:10.536213984 +0100
3@@ -740,23 +740,24 @@
4
5 cdinfo(CD_OPEN, "entering cdrom_open\n");
6 cdi->use_count++;
7- ret = -EROFS;
8- if (fp->f_mode & FMODE_WRITE) {
9- printk("cdrom: %s opening for WRITE\n", current->comm);
10- if (!CDROM_CAN(CDC_RAM)) {
11- printk("bzzt\n");
12- goto out;
13- }
14- if (cdrom_open_write(cdi))
15- goto out;
16- }
17
18 /* if this was a O_NONBLOCK open and we should honor the flags,
19 * do a quick open without drive/disc integrity checks. */
20 if ((fp->f_flags & O_NONBLOCK) && (cdi->options & CDO_USE_FFLAGS))
21 ret = cdi->ops->open(cdi, 1);
22- else
23+ else {
24+ if (fp->f_mode & FMODE_WRITE) {
25+ ret = -EROFS;
26+ printk("cdrom: %s opening for WRITE\n", current->comm);
27+ if (!CDROM_CAN(CDC_RAM)) {
28+ printk("bzzt\n");
29+ goto out;
30+ }
31+ if (cdrom_open_write(cdi))
32+ goto out;
33+ }
34 ret = open_for_data(cdi);
35+ }
36
37 cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n", cdi->name, cdi->use_count);
38 /* Do this on open. Don't wait for mount, because they might
This page took 0.073075 seconds and 4 git commands to generate.