diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2006-11-29 14:01:40 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-11-29 14:01:40 +0100 |
commit | 18ff15828e2912b6d68a0481e01cd1ec34eb19e6 (patch) | |
tree | da2a9523ba0a70406fc36fa4aa59231ba694a38d /block/scsi_ioctl.c | |
parent | feeddb339e1e9670e436f5f6328d958941727875 (diff) |
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: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'block/scsi_ioctl.c')
-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 24f7af9d0abc..f84f269b005c 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; } |