summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 19:56:11 +0900
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:08 +0200
commit4c46501d1659475dc6c89554af6ce7fe6ecf615c (patch)
tree03bfdf77e2d20c3190ba62532c783ab7f6a2640d /block
parentb7db9956e57c8151b930d5e5fe5c766e6aad3ff7 (diff)
downloadlinux-3.10-4c46501d1659475dc6c89554af6ce7fe6ecf615c.tar.gz
linux-3.10-4c46501d1659475dc6c89554af6ce7fe6ecf615c.tar.bz2
linux-3.10-4c46501d1659475dc6c89554af6ce7fe6ecf615c.zip
block: move holder_dir from disk to part0
Move disk->holder_dir to part0->holder_dir. Kill now mostly superflous bdev_get_holder(). While at it, kill superflous kobject_get/put() around holder_dir, slave_dir and cmd_filter creation and collapse disk_sysfs_add_subdirs() into register_disk(). These serve no purpose but obfuscating the code. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cmd-filter.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/block/cmd-filter.c b/block/cmd-filter.c
index 79c14996ac1..e669aed4c6b 100644
--- a/block/cmd-filter.c
+++ b/block/cmd-filter.c
@@ -211,14 +211,10 @@ int blk_register_filter(struct gendisk *disk)
{
int ret;
struct blk_cmd_filter *filter = &disk->queue->cmd_filter;
- struct kobject *parent = kobject_get(disk->holder_dir->parent);
- if (!parent)
- return -ENODEV;
-
- ret = kobject_init_and_add(&filter->kobj, &rcf_ktype, parent,
+ ret = kobject_init_and_add(&filter->kobj, &rcf_ktype,
+ &disk_to_dev(disk)->kobj,
"%s", "cmd_filter");
-
if (ret < 0)
return ret;
@@ -231,7 +227,6 @@ void blk_unregister_filter(struct gendisk *disk)
struct blk_cmd_filter *filter = &disk->queue->cmd_filter;
kobject_put(&filter->kobj);
- kobject_put(disk->holder_dir->parent);
}
EXPORT_SYMBOL(blk_unregister_filter);
#endif