diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2007-06-20 13:53:23 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-07-10 08:03:34 +0200 |
commit | e654bc4393e85e326993256d80b9710a4d6411ff (patch) | |
tree | bf30413fd62f778e4c9abd8bc92e7a399ac37e53 /drivers/block | |
parent | 9cff3b383dad193b0762c27278a16237e10b53dc (diff) |
[PATCH] fix request->cmd == INT cases
- I have unearthed very old bugs in stale drivers that still
used request->cmd as a READ|WRITE int
- This patch is maybe a proof that these drivers have not been
used for a long time. Should they be removed completely?
Drivers that currently do not work for sure:
drivers/acorn/block/fd1772.c | 2 +-
drivers/acorn/block/mfmhd.c | 8 ++++----
drivers/cdrom/aztcd.c | 2 +-
drivers/cdrom/cm206.c | 2 +-
drivers/cdrom/gscd.c | 2 +-
drivers/cdrom/mcdx.c | 2 +-
drivers/cdrom/optcd.c | 2 +-
drivers/cdrom/sjcd.c | 2 +-
Drivers with cosmetic fixes only:
b/drivers/block/amiflop.c
b/drivers/block/nbd.c
b/drivers/ide/legacy/hd.c
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/amiflop.c | 2 | ||||
-rw-r--r-- | drivers/block/nbd.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 27a139025ced..6ce8b897e262 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c @@ -1363,7 +1363,7 @@ static void redo_fd_request(void) #ifdef DEBUG printk("fd: sector %ld + %d requested for %s\n", CURRENT->sector,cnt, - (CURRENT->cmd==READ)?"read":"write"); + (rq_data_dir(CURRENT) == READ) ? "read" : "write"); #endif block = CURRENT->sector + cnt; if ((int)block > floppy->blocks) { diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 069ae39a9cd9..c575fb1d585f 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -416,7 +416,7 @@ static void nbd_clear_que(struct nbd_device *lo) /* * We always wait for result of write, for now. It would be nice to make it optional * in future - * if ((req->cmd == WRITE) && (lo->flags & NBD_WRITE_NOCHK)) + * if ((rq_data_dir(req) == WRITE) && (lo->flags & NBD_WRITE_NOCHK)) * { printk( "Warning: Ignoring result!\n"); nbd_end_request( req ); } */ |