Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blkdev_put

Proto:void blkdev_put(struct block_device *bdev, fmode_t mode)

Type:void

Parameter:

TypeParameterName
struct block_device *bdev
fmode_tmode
1916  mutex_lock( & open/close mutex )
1918  If mode & File is opened with O_EXCL (only set for block devices) Then
1926  spin_lock( & pseudo-fs)
1928  WARN_ON_ONCE(--bd_holders < 0)
1929  WARN_ON_ONCE(--bd_holders < 0)
1932  If bdev_free = Not bd_holders Then bd_holder = NULL
1934  If Not bd_holders Then bd_holder = NULL
1937  spin_unlock( & pseudo-fs)
1943  If bdev_free && bd_write_holder Then
1945  bd_write_holder = false
1954  disk_flush_events(bd_disk, DISK_EVENT_MEDIA_CHANGE)
1956  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1958  __blkdev_put(bdev, mode, 0)
Caller
NameDescribe
swsusp_checkswsusp_check - Check for swsusp signature in the resume device
swsusp_closeswsusp_close - close swap device.
SYSCALL_DEFINE2
register_disk
get_tree_bdevget_tree_bdev - Get a superblock based on a single block device*@fc: The filesystem context holding the parameters*@fill_super: Helper to initialise a new superblock
mount_bdev
kill_block_super
blkdev_get_by_pathlkdev_get_by_path - open a block device by name*@path: path to the block device to open*@mode: FMODE_* mask*@holder: exclusive holder identifier* Open the blockdevice described by the device file at @path. @mode* and @holder are identical to blkdev_get().
blkdev_close
swsusp_swap_checkswsusp_swap_check - check if the resume device is a swap device* and get its index (if so)* This is called before saving image