Staging: hv: fix sysfs symlink on hv block device
authorKy Srinivasan <ksrinivasan@novell.com>
Fri, 17 Dec 2010 01:59:19 +0000 (18:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:36:51 +0000 (15:36 -0800)
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 <ksrinivasan@novell.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/blkvsc_drv.c

index 62b282844a53eb2e29ff96e418d95d778b1fc700..871a2028670f07f1fc24bbd0d9d5df64cbd5eaa1 100644 (file)
@@ -378,6 +378,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);