From git-commits-head-owner@vger.kernel.org Mon Nov 13 21:55:15 2006 Date: Mon, 13 Nov 2006 17:59:01 GMT Message-Id: <200611131759.kADHx1kX004578@hera.kernel.org> From: Linux Kernel Mailing List To: git-commits-head@vger.kernel.org Subject: [PATCH] Fix bad data direction in SG_IO commit 616e8a091a035c0bd9b871695f4af191df123caa tree 9b9c97c6b55a9a097bafb453085375497b916fdc parent bf2b3de2a8e66e5f554c2113fac688bcaaca77fb author Jens Axboe 1163437499 +0100 committer Linus Torvalds 1163440020 -0800 [PATCH] Fix bad data direction in SG_IO Contrary to what the name misleads you to believe, SG_DXFER_TO_FROM_DEV is really just a normal read seen from the device side. This patch fixes http://lkml.org/lkml/2006/10/13/100 Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds block/scsi_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 2dc3264..a19338e 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -246,10 +246,10 @@ static int sg_io(struct file *file, requ switch (hdr->dxfer_direction) { default: return -EINVAL; - case SG_DXFER_TO_FROM_DEV: case SG_DXFER_TO_DEV: writing = 1; break; + case SG_DXFER_TO_FROM_DEV: case SG_DXFER_FROM_DEV: break; }