diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2006-11-13 17:59:01 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-11-18 19:28:05 -0800 |
commit | 6d7e0615152b01b5bd1dd8c9aea5d949e50fed93 (patch) | |
tree | 78f95338718cc6a2dee7d3813fb6d2eca6641d27 | |
parent | 797555ff2bd8d6ae181416d8f3c1abe69a3b7363 (diff) | |
download | lwn-6d7e0615152b01b5bd1dd8c9aea5d949e50fed93.tar.gz lwn-6d7e0615152b01b5bd1dd8c9aea5d949e50fed93.zip |
[PATCH] block: 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 <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | block/scsi_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index b33eda26e205..ed3d3aec7e9a 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -246,10 +246,10 @@ static int sg_io(struct file *file, request_queue_t *q, 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; } |