Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fsopen.c Create Date:2022-07-28 20:13:28
Last Modify:2022-05-24 07:35:12 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check the state and apply the configuration. Note that this function is* allowed to 'steal' the value by setting param->xxx to NULL before returning.

Proto:static int vfs_fsconfig_locked(struct fs_context *fc, int cmd, struct fs_parameter *param)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
intcmd
struct fs_parameter *param
222  ret = finish_clean_context(fc)
223  If ret Then Return ret
226  Case cmd == FSCONFIG_CMD_CREATE
227  If phase != FS_CONTEXT_CREATE_PARAMS Then Return -EBUSY
229  If Not mount_capable(fc) Then Return -EPERM
231  phase = FS_CONTEXT_CREATING
232  ret = vfs_get_tree - Get the mountable root*@fc: The superblock configuration context.* The filesystem is invoked to get or create a superblock which can then later* be used for mounting. The filesystem places a pointer to the root to be
233  If ret Then Break
235  sb = d_sb
236  ret = security_sb_kern_mount(sb)
239  Break
241  lease a write lock
242  phase = FS_CONTEXT_AWAITING_MOUNT
243  Return 0
244  Case cmd == FSCONFIG_CMD_RECONFIGURE
245  If phase != FS_CONTEXT_RECONF_PARAMS Then Return -EBUSY
247  phase = FS_CONTEXT_RECONFIGURING
248  sb = d_sb
250  ret = -EPERM
251  Break
253  lock for writing
254  ret = gure_super - asks filesystem to change superblock parameters*@fc: The superblock and configuration* Alters the configuration parameters of a live superblock.
255  lease a write lock
256  If ret Then Break
258  Clean up a context after performing an action on it and put it into a state* from where it can be used to reconfigure a superblock
259  Return 0
260  Default
261  If phase != FS_CONTEXT_CREATE_PARAMS && phase != FS_CONTEXT_RECONF_PARAMS Then Return -EBUSY
265  Return vfs_parse_fs_param - Add a single parameter to a superblock config*@fc: The filesystem context to modify*@param: The parameter* A single mount option in string form is applied to the filesystem context* being set up
267  phase = FS_CONTEXT_FAILED
268  Return ret