Re: [Ubuntu PATCH] CDROMEJECT cannot eject some devices

From: Matthew Wilcox
Date: Mon Jul 03 2006 - 17:03:32 EST


On Mon, Jul 03, 2006 at 01:46:24PM -0700, Randy Dunlap wrote:
>
> Fix the bug where CDROMEJECT cannot eject some devices.

> --- linux-2617-g21.orig/block/scsi_ioctl.c
> +++ linux-2617-g21/block/scsi_ioctl.c
> @@ -501,7 +501,7 @@ static int __blk_send_generic(request_qu
> struct request *rq;
> int err;
>
> - rq = blk_get_request(q, WRITE, __GFP_WAIT);
> + rq = blk_get_request(q, READ, __GFP_WAIT);

I don't believe this hunk is necessary for mainline. IIRC, there was a
bug around length checks vs read vs write which is now fixed.
Presumably it's still needed in Ubuntu's kernel though.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/