函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\super.c Create Date:2022-07-29 10:32:21
Last Modify:2022-05-24 06:42:17 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:grab_super - acquire an active reference*@s: reference we are trying to make active* Tries to acquire an active reference. grab_super() is used when we* had just found a superblock in super_blocks or fs_type->fs_supers

函数原型:static int grab_super(struct super_block *s)__releases(sb_lock)

返回类型:int

参数:

类型参数名称
struct super_block *s
387  s_count自加
388  自旋锁解锁
389  lock for writing
390  如果s_flags按位与SB_BORNatomic_inc_not_zero - increment unless the number is zero*@v: pointer of type atomic_t* Atomically increments @v by 1, if @v is non-zero.* Returns true if the increment was done.
391  put_super - drop a temporary reference to superblock*@sb: superblock in question* Drops a temporary reference, frees superblock if there's no* references left.
392  返回:1
394  lease a write lock
395  put_super - drop a temporary reference to superblock*@sb: superblock in question* Drops a temporary reference, frees superblock if there's no* references left.
396  返回:0
调用者
名称描述
sget_fcsget_fc - Find or create a superblock*@fc: Filesystem context
sget查找或创建超级块
get_active_superget_active_super - get an active reference to the superblock of a device*@bdev: device to get the superblock for* Scans the superblock list and finds the superblock of the file system* mounted on the device given. Returns the superblock with an active