Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-28 17:18:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:del_gendisk

Proto:void del_gendisk(struct gendisk *disk)

Type:void

Parameter:

TypeParameterName
struct gendisk *disk
778  blk_integrity_del(disk)
779  disk_del_events(disk)
785  lock for writing
787  disk_part_iter_init - initialize partition iterator*@piter: iterator to initialize*@disk: disk to iterate over*@flags: DISK_PITER_* flags* Initialize @piter so that it iterates over partitions of @disk.* CONTEXT:* Don't care.
789  When part = disk_part_iter_next - proceed iterator to the next partition and return it*@piter: iterator of interest* Proceed @piter to the next partition and return it.* CONTEXT:* Don't care. cycle
790  invalidate_partition(disk, partno)
791  bdev_unhash_inode(part_devt(part))
792  Must be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.
794  disk_part_iter_exit - finish up partition iteration*@piter: iter of interest* Called when iteration is over. Cleans up @piter.* CONTEXT:* Don't care.
796  invalidate_partition(disk, 0)
797  bdev_unhash_inode(disk_devt(disk))
798  set_capacity(disk, 0)
799  flags &= ~GENHD_FL_UP
800  lease a write lock
802  If Not (flags & GENHD_FL_HIDDEN) Then sysfs_remove_link( & kobj, "bdi")
804  If queue Then
809  If Not (flags & GENHD_FL_HIDDEN) Then bdi_unregister(backing_dev_info)
811  lk_unregister_queue - counterpart of blk_register_queue()*@disk: Disk of which the request queue should be unregistered from sysfs.* Note: the caller is responsible for guaranteeing that this function is called* after blk_register_queue() has finished.
812  Else
813  WARN_ON(1)
816  If Not (flags & GENHD_FL_HIDDEN) Then blk_unregister_region(disk_devt(disk), maximum number of minors, =1 for * disks that can't be partitioned. )
824  We invalidate devt by assigning NULL pointer for devt in idr.
826  kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
827  kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
829  part_stat_set_all( & part0, 0)
830  stamp = 0
831  If Not sysfs_deprecated Then sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk)))
833  pm_runtime_set_memalloc_noio(disk_to_dev(disk), false)
834  device_del(disk_to_dev(disk))