函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mount_bdev

函数原型:struct dentry *mount_bdev(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, int (*fill_super)(struct super_block *, void *, int ))

返回类型:struct dentry

参数:

类型参数名称
struct file_system_type *fs_type
intflags
const char *dev_name
void *data
int (*fill_super
1369  mode等于le is open for reading 按位或File is opened with O_EXCL (only set for block devices)
1370  error等于0
1372  如果非flags按位与Mount read-only 的值则mode或等于le is open for writing
1375  bdev等于blkdev_get_by_path(dev_name, mode, fs_type)
1376  如果是错误则返回:错误指示
1384  mutex_lock( & Mutex for freeze )
1385  如果 The counter of freeze processes 大于0则
1386  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.
1387  error等于负EBUSY
1388  转到:error_bdev
1390  s等于查找或创建超级块
1392  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.
1393  如果是错误则转到:error_s
1396  如果s_root
1397  如果flags按位异或s_flags的值按位与Mount read-only
1399  error等于负EBUSY
1400  转到:error_bdev
1410  lease a write lock
1411  blkdev_put(bdev, mode)
1412  lock for writing
1413  否则
1414  s_mode等于mode
1415  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1416  sb_set_blocksize(s, block_size(bdev))
1417  error等于fill_super(s, data, flags & SB_SILENT ? 1 : 0)
1418  如果error
1420  转到:error
1423  s_flags或等于SB_ACTIVE
1424  bd_super等于s
1427  返回:获得目录项引用
1429  error_s :
1430  error等于错误
1431  error_bdev :
1432  blkdev_put(bdev, mode)
1433  error :
1434  返回:错误号