public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Diego Calleja <grundig@teleline.es>
Cc: Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>,
	ramon.rey@hispalinux.es, akpm@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-mm2
Date: Tue, 30 Dec 2003 10:45:47 +0100	[thread overview]
Message-ID: <20031230094547.GB7833@suse.de> (raw)
In-Reply-To: <20031229233839.7f3b5666.grundig@teleline.es>

On Mon, Dec 29 2003, Diego Calleja wrote:
> El Mon, 29 Dec 2003 21:57:26 +0100 Felipe Alfaro Solana <felipe_alfaro@linuxmail.org> escribió:
> 
> > The same happens here. cdrecord is broken under -mm, but works fine with
> > plain 2.6.0.
> 
> 
> 
> I'm seeing the same here:
> 
> open("/dev/cd-rw", O_RDWR|O_NONBLOCK)   = -1 EROFS (Read-only file system)
> write(2, "cdrecord.mmap: Read-only file sy"..., 89cdrecord.mmap: Read-only file system. Cannot open '/dev/cd-rw'. Cannot open SCSI driver.) = 89

--- drivers/cdrom/cdrom.c~	2003-12-29 15:58:55.698005022 +0100
+++ drivers/cdrom/cdrom.c	2003-12-29 16:01:32.555918156 +0100
@@ -740,20 +740,21 @@
 
 	cdinfo(CD_OPEN, "entering cdrom_open\n"); 
 	cdi->use_count++;
-	ret = -EROFS;
-	if (fp->f_mode & FMODE_WRITE) {
-		if (!CDROM_CAN(CDC_RAM))
-			goto out;
-		if (cdrom_open_write(cdi))
-			goto out;
-	}
 
 	/* if this was a O_NONBLOCK open and we should honor the flags,
 	 * do a quick open without drive/disc integrity checks. */
 	if ((fp->f_flags & O_NONBLOCK) && (cdi->options & CDO_USE_FFLAGS))
 		ret = cdi->ops->open(cdi, 1);
-	else
+	else {
+		if (fp->f_mode & FMODE_WRITE) {
+			ret = -EROFS;
+			if (!CDROM_CAN(CDC_RAM))
+				goto out;
+			if (cdrom_open_write(cdi))
+				goto out;
+		}
 		ret = open_for_data(cdi);
+	}
 
 	cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n", cdi->name, cdi->use_count);
 	/* Do this on open.  Don't wait for mount, because they might

Fix is with andrew for -mm3

-- 
Jens Axboe


  reply	other threads:[~2003-12-30  9:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-29  9:32 2.6.0-mm2 Andrew Morton
2003-12-29 11:06 ` 2.6.0-mm2 Joshua Kwan
2003-12-29 14:46 ` 2.6.0-mm2 Ian Soboroff
2003-12-29 16:39 ` 2.6.0-mm2 GCS
2003-12-29 20:10   ` 2.6.0-mm2 Marcos D. Marado Torres
2003-12-29 23:32     ` 2.6.0-mm2 Dmitry Torokhov
2003-12-30  3:05       ` 2.6.0-mm2 Marcos D. Marado Torres
2003-12-30  4:15         ` 2.6.0-mm2 Dmitry Torokhov
2003-12-30  5:03           ` 2.6.0-mm2 Marcos D. Marado Torres
2003-12-30  5:21             ` 2.6.0-mm2 Dmitry Torokhov
2003-12-30  6:26               ` 2.6.0-mm2 Marcos D. Marado Torres
2003-12-29 18:31 ` 2.6.0-mm2 Dax Kelson
2003-12-29 18:53   ` 2.6.0-mm2 Joshua Kwan
2003-12-29 18:55   ` 2.6.0-mm2 Joshua Kwan
2003-12-29 19:28 ` 2.6.0-mm2 Stef van der Made
2003-12-29 20:24   ` 2.6.0-mm2 Shawn
2003-12-29 21:35     ` 2.6.0-mm2 Stef van der Made
2003-12-29 22:48     ` 2.6.0-mm2 Mike Fedyk
2003-12-29 23:01       ` 2.6.0-mm2 Linus Torvalds
2003-12-29 19:59 ` 2.6.0-mm2 Ramon Rey Vicente
2003-12-29 20:57   ` 2.6.0-mm2 Felipe Alfaro Solana
2003-12-29 21:52     ` 2.6.0-mm2 Davide Libenzi
2003-12-29 22:26       ` 2.6.0-mm2 Felipe Alfaro Solana
2003-12-29 22:38     ` 2.6.0-mm2 Diego Calleja
2003-12-30  9:45       ` Jens Axboe [this message]
2003-12-31  1:25 ` 2.6.0-mm2 (compile stats) John Cherry
     [not found] <1822L-89t-7@gated-at.bofh.it>
2003-12-29 12:08 ` 2.6.0-mm2 Ronny V. Vindenes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031230094547.GB7833@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=grundig@teleline.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ramon.rey@hispalinux.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox