]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] fix cdrom open
authorJens Axboe <axboe@suse.de>
Fri, 16 Jun 2006 05:46:37 +0000 (07:46 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 17 Jun 2006 17:44:26 +0000 (10:44 -0700)
commit16070428d389ff47aa3476b0911179ad90c640a2
treefb9b9a15a720bf5fb070f2a0fd611aaabd9d1b52
parent553698f944ed715dfe023b4cef07601f0ce735f0
[PATCH] fix cdrom open

Some time ago the cdrom open routine was changed so that we call the
driver's open routine before checking to see if it is read only.  However,
if we discovered that a read write open was not possible and the open
flags required a writable open, we just returned -EROFS without calling
the driver's release routine.   This seems to work for most cdrom drivers,
but breaks the Powerpc iSeries virtual cdrom rather badly.

This just inserts the release call in the error path to balance the call
to "->open()" done by "open_for_data()".

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/cdrom/cdrom.c