Skip to content

Commit 3cbc28b

Browse files
balbir-awsaxboe
authored andcommitted
xen-blkfront.c: Convert to use set_capacity_revalidate_and_notify
block/genhd provides set_capacity_revalidate_and_notify() for sending RESIZE notifications via uevents. Signed-off-by: Balbir Singh <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 662155e commit 3cbc28b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/block/xen-blkfront.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,6 @@ static void blkfront_connect(struct blkfront_info *info)
23382338
unsigned long sector_size;
23392339
unsigned int physical_sector_size;
23402340
unsigned int binfo;
2341-
char *envp[] = { "RESIZE=1", NULL };
23422341
int err, i;
23432342
struct blkfront_ring_info *rinfo;
23442343

@@ -2354,10 +2353,7 @@ static void blkfront_connect(struct blkfront_info *info)
23542353
return;
23552354
printk(KERN_INFO "Setting capacity to %Lu\n",
23562355
sectors);
2357-
set_capacity(info->gd, sectors);
2358-
revalidate_disk(info->gd);
2359-
kobject_uevent_env(&disk_to_dev(info->gd)->kobj,
2360-
KOBJ_CHANGE, envp);
2356+
set_capacity_revalidate_and_notify(info->gd, sectors, true);
23612357

23622358
return;
23632359
case BLKIF_STATE_SUSPENDED:

0 commit comments

Comments
 (0)