aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-29 03:54:37 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 08:48:55 -0400
commit4f54eec8311c3325888c29ce8e4496daf4dbe624 (patch)
treee1bdf703cc0a5f91651216f6ae37cb34bd54cc6c /drivers/block/nbd.c
parent2a4aa30c5f967eb6ae874c67fa6fceeee84815f9 (diff)
block: use blk_rq_init() to initialize the request
Any path needs to call it to initialize the request. This is a preparation for large command support, which needs to initialize the request in a proper way (that is, just doing a memset() will not work). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 60cc54368b66..f75bda16a1fc 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -537,6 +537,7 @@ static int nbd_ioctl(struct inode *inode, struct file *file,
537 switch (cmd) { 537 switch (cmd) {
538 case NBD_DISCONNECT: 538 case NBD_DISCONNECT:
539 printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name); 539 printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name);
540 blk_rq_init(NULL, &sreq);
540 sreq.cmd_type = REQ_TYPE_SPECIAL; 541 sreq.cmd_type = REQ_TYPE_SPECIAL;
541 nbd_cmd(&sreq) = NBD_CMD_DISC; 542 nbd_cmd(&sreq) = NBD_CMD_DISC;
542 /* 543 /*