Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\super.c Create Date:2022-07-28 20:02:24
Last Modify:2022-05-24 06:42:17 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int grab_super(struct super_block *s)__releases(sb_lock)

Type:int

Parameter:

TypeParameterName
struct super_block *s
387  s_count++
388  spin_unlock( & sb_lock)
389  lock for writing
390  If s_flags & SB_BORN && atomic_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. Then
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  Return 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  Return 0
Caller
NameDescribe
sget_fcsget_fc - Find or create a superblock*@fc: Filesystem context
sgetfind or create a superblock
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