函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\block_dev.c Create Date:2022-07-29 10:46:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blkdev_put

函数原型:void blkdev_put(struct block_device *bdev, fmode_t mode)

返回类型:void

参数:

类型参数名称
struct block_device *bdev
fmode_tmode
1916  mutex_lock( & open/close mutex )
1918  如果mode按位与File is opened with O_EXCL (only set for block devices)
1926  加自旋锁
1928  WARN_ON_ONCE(--bd_holders < 0)
1929  WARN_ON_ONCE(--bd_holders < 0)
1932  如果bdev_free等于非bd_holdersbd_holder = NULL
1934  如果非bd_holdersbd_holder = NULL
1937  自旋锁解锁
1943  如果bdev_freebd_write_holder
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)
调用者
名称描述
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