Merge tag 'for-linus-5.7-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-starfive.git] / drivers / block / xen-blkfront.c
index b32877e..3b889ea 100644 (file)
@@ -2345,7 +2345,6 @@ static void blkfront_connect(struct blkfront_info *info)
        unsigned long sector_size;
        unsigned int physical_sector_size;
        unsigned int binfo;
-       char *envp[] = { "RESIZE=1", NULL };
        int err, i;
        struct blkfront_ring_info *rinfo;
 
@@ -2361,10 +2360,7 @@ static void blkfront_connect(struct blkfront_info *info)
                        return;
                printk(KERN_INFO "Setting capacity to %Lu\n",
                       sectors);
-               set_capacity(info->gd, sectors);
-               revalidate_disk(info->gd);
-               kobject_uevent_env(&disk_to_dev(info->gd)->kobj,
-                                  KOBJ_CHANGE, envp);
+               set_capacity_revalidate_and_notify(info->gd, sectors, true);
 
                return;
        case BLKIF_STATE_SUSPENDED: