Lines Matching refs:bdev

7 	struct block_device	*bdev;  member
11 static struct bd_holder_disk *bd_find_holder_disk(struct block_device *bdev, in bd_find_holder_disk() argument
17 if (holder->bdev == bdev) in bd_find_holder_disk()
32 static int __link_disk_holder(struct block_device *bdev, struct gendisk *disk) in __link_disk_holder() argument
36 ret = add_symlink(disk->slave_dir, bdev_kobj(bdev)); in __link_disk_holder()
39 ret = add_symlink(bdev->bd_holder_dir, &disk_to_dev(disk)->kobj); in __link_disk_holder()
41 del_symlink(disk->slave_dir, bdev_kobj(bdev)); in __link_disk_holder()
73 int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk) in bd_link_disk_holder() argument
80 WARN_ON_ONCE(!bdev->bd_holder); in bd_link_disk_holder()
83 if (WARN_ON(!bdev->bd_holder_dir)) in bd_link_disk_holder()
86 holder = bd_find_holder_disk(bdev, disk); in bd_link_disk_holder()
99 holder->bdev = bdev; in bd_link_disk_holder()
102 ret = __link_disk_holder(bdev, disk); in bd_link_disk_holder()
114 kobject_get(bdev->bd_holder_dir); in bd_link_disk_holder()
122 static void __unlink_disk_holder(struct block_device *bdev, in __unlink_disk_holder() argument
125 del_symlink(disk->slave_dir, bdev_kobj(bdev)); in __unlink_disk_holder()
126 del_symlink(bdev->bd_holder_dir, &disk_to_dev(disk)->kobj); in __unlink_disk_holder()
139 void bd_unlink_disk_holder(struct block_device *bdev, struct gendisk *disk) in bd_unlink_disk_holder() argument
144 holder = bd_find_holder_disk(bdev, disk); in bd_unlink_disk_holder()
147 __unlink_disk_holder(bdev, disk); in bd_unlink_disk_holder()
148 kobject_put(bdev->bd_holder_dir); in bd_unlink_disk_holder()
163 ret = __link_disk_holder(holder->bdev, disk); in bd_register_pending_holders()
172 __unlink_disk_holder(holder->bdev, disk); in bd_register_pending_holders()