From: Ky Srinivasan Date: Fri, 17 Dec 2010 01:59:19 +0000 (-0700) Subject: Staging: hv: fix sysfs symlink on hv block device X-Git-Tag: v2.6.37.1~232 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1f17ecf71fff176b2a9c256a1d39c2ebe7b31bde;p=users%2Fdwmw2%2Flinux.git Staging: hv: fix sysfs symlink on hv block device commit 268eff909afaca93188d2d14554cbf824f6a0e41 upstream. The block device does not create the proper symlink in sysfs because we forgot to set up the gendisk structure properly. This patch fixes the issue. Signed-off-by: K. Y. Srinivasan Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 3f81ca5910649..b255c8ba42d89 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -368,6 +368,7 @@ static int blkvsc_probe(struct device *device) blkdev->gd->first_minor = 0; blkdev->gd->fops = &block_ops; blkdev->gd->private_data = blkdev; + blkdev->gd->driverfs_dev = &(blkdev->device_ctx->device); sprintf(blkdev->gd->disk_name, "hd%c", 'a' + devnum); blkvsc_do_inquiry(blkdev);