aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r--fs/partitions/check.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 6d720243f5f4..99e33ef40be4 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -19,6 +19,7 @@
19#include <linux/kmod.h> 19#include <linux/kmod.h>
20#include <linux/ctype.h> 20#include <linux/ctype.h>
21#include <linux/genhd.h> 21#include <linux/genhd.h>
22#include <linux/blktrace_api.h>
22 23
23#include "check.h" 24#include "check.h"
24 25
@@ -294,6 +295,9 @@ static struct attribute_group part_attr_group = {
294 295
295static struct attribute_group *part_attr_groups[] = { 296static struct attribute_group *part_attr_groups[] = {
296 &part_attr_group, 297 &part_attr_group,
298#ifdef CONFIG_BLK_DEV_IO_TRACE
299 &blk_trace_attr_group,
300#endif
297 NULL 301 NULL
298}; 302};
299 303
@@ -400,7 +404,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
400 pdev->devt = devt; 404 pdev->devt = devt;
401 405
402 /* delay uevent until 'holders' subdir is created */ 406 /* delay uevent until 'holders' subdir is created */
403 pdev->uevent_suppress = 1; 407 dev_set_uevent_suppress(pdev, 1);
404 err = device_add(pdev); 408 err = device_add(pdev);
405 if (err) 409 if (err)
406 goto out_put; 410 goto out_put;
@@ -410,7 +414,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
410 if (!p->holder_dir) 414 if (!p->holder_dir)
411 goto out_del; 415 goto out_del;
412 416
413 pdev->uevent_suppress = 0; 417 dev_set_uevent_suppress(pdev, 0);
414 if (flags & ADDPART_FLAG_WHOLEDISK) { 418 if (flags & ADDPART_FLAG_WHOLEDISK) {
415 err = device_create_file(pdev, &dev_attr_whole_disk); 419 err = device_create_file(pdev, &dev_attr_whole_disk);
416 if (err) 420 if (err)
@@ -422,7 +426,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
422 rcu_assign_pointer(ptbl->part[partno], p); 426 rcu_assign_pointer(ptbl->part[partno], p);
423 427
424 /* suppress uevent if the disk supresses it */ 428 /* suppress uevent if the disk supresses it */
425 if (!ddev->uevent_suppress) 429 if (!dev_get_uevent_suppress(pdev))
426 kobject_uevent(&pdev->kobj, KOBJ_ADD); 430 kobject_uevent(&pdev->kobj, KOBJ_ADD);
427 431
428 return p; 432 return p;
@@ -455,7 +459,7 @@ void register_disk(struct gendisk *disk)
455 dev_set_name(ddev, disk->disk_name); 459 dev_set_name(ddev, disk->disk_name);
456 460
457 /* delay uevents, until we scanned partition table */ 461 /* delay uevents, until we scanned partition table */
458 ddev->uevent_suppress = 1; 462 dev_set_uevent_suppress(ddev, 1);
459 463
460 if (device_add(ddev)) 464 if (device_add(ddev))
461 return; 465 return;
@@ -490,7 +494,7 @@ void register_disk(struct gendisk *disk)
490 494
491exit: 495exit:
492 /* announce disk after possible partitions are created */ 496 /* announce disk after possible partitions are created */
493 ddev->uevent_suppress = 0; 497 dev_set_uevent_suppress(ddev, 0);
494 kobject_uevent(&ddev->kobj, KOBJ_ADD); 498 kobject_uevent(&ddev->kobj, KOBJ_ADD);
495 499
496 /* announce possible partitions */ 500 /* announce possible partitions */