Re: 2.6.8-rc2-mm2

Peter Osterlund
2004-08-02T18:16:13Z

Andrew Morton <akpm@osdl.org> writes:

> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8-rc2/2.6.8-rc2-mm2/
>
> Changes since 2.6.8-rc2-mm1:
>
> +packet-door-unlock.patch
> +pkt_lock_door-warning-fix.patch

The door-unlock patch got mis-merged, which caused the need for the
warning fix patch. pkt_lock_door should be called from
pkt_release_dev, not from pkt_generic_packet. This patch fixes it.

Signed-off-by: Peter Osterlund <petero2@telia.com>

--- linux/drivers/block/pktcdvd.c 2004-08-02 19:53:53.465566752 +0200
+++ ../cdr/linux/drivers/block/pktcdvd.c 2004-08-02 20:03:10.960162040 +0200
@@ -72,7 +72,6 @@ static struct proc_dir_entry *pkt_proc;
static int pkt_major;
static struct semaphore ctl_mutex; /* Serialize open/close/setup/teardown */

-static int pkt_lock_door(struct pktcdvd_device *pd, int lockflag);

static struct pktcdvd_device *pkt_find_dev(request_queue_t *q)
{
@@ -304,8 +303,6 @@ static int pkt_generic_packet(struct pkt
DECLARE_COMPLETION(wait);
int err = 0;

- pkt_lock_door(pd, 0);
-
q = bdev_get_queue(pd->bdev);

rq = blk_get_request(q, (cgc->data_direction == CGC_DATA_WRITE) ? WRITE : READ,
@@ -1956,6 +1953,8 @@ static void pkt_release_dev(struct pktcd
if (flush && pkt_flush_cache(pd))
DPRINTK("pktcdvd: %s not flushing cache\n", pd->name);

+ pkt_lock_door(pd, 0);
+
q = bdev_get_queue(pd->bdev);
pkt_set_speed(pd, MAX_SPEED, MAX_SPEED);
spin_lock_irq(q->queue_lock);

--
Peter Osterlund - petero2@telia.com