diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:42 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:55 -0400 |
commit | b0790410300abaaf4f25f702803beff701baebf1 (patch) | |
tree | 63d8fcd38e4cd5927fd83e482e306480bb68a689 /drivers/ata/libata-scsi.c | |
parent | 2e46e8b27aa57c6bd34b3102b40ee4d0144b4fab (diff) |
block: cleanup rq->data_len usages
With recent unification of fields, it's now guaranteed that
rq->data_len always equals blk_rq_bytes(). Convert all non-IDE direct
users to accessors. IDE will be converted in a separate patch.
Boaz: spotted incorrect data_len/resid_len conversion in osd.
[ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 2733b0c90b75..6e4c600f5a1c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1084,7 +1084,7 @@ static int atapi_drain_needed(struct request *rq) | |||
1084 | if (likely(!blk_pc_request(rq))) | 1084 | if (likely(!blk_pc_request(rq))) |
1085 | return 0; | 1085 | return 0; |
1086 | 1086 | ||
1087 | if (!rq->data_len || (rq->cmd_flags & REQ_RW)) | 1087 | if (!blk_rq_bytes(rq) || (rq->cmd_flags & REQ_RW)) |
1088 | return 0; | 1088 | return 0; |
1089 | 1089 | ||
1090 | return atapi_cmd_type(rq->cmd[0]) == ATAPI_MISC; | 1090 | return atapi_cmd_type(rq->cmd[0]) == ATAPI_MISC; |