mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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 <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
bf2b3de2a8
commit
616e8a091a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue