Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namespace.c Create Date:2022-07-28 20:09:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:reate a new mount for userspace and request it to be added into the* namespace's tree

Proto:static int do_new_mount(struct path *path, const char *fstype, int sb_flags, int mnt_flags, const char *name, void *data)

Type:int

Parameter:

TypeParameterName
struct path *path
const char *fstype
intsb_flags
intmnt_flags
const char *name
void *data
2786  const char * subtype = NULL
2787  err = 0
2789  If Not fstype Then Return -EINVAL
2792  type = get_fs_type(fstype)
2793  If Not type Then Return -ENODEV
2796  If fs_flags & FS_HAS_SUBTYPE Then
2797  subtype = strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
2798  If subtype Then
2799  subtype++
2800  If Not subtype Then
2802  Return -EINVAL
2807  fc = s_context manipulation functions.
2808  put_filesystem(type)
2809  If IS_ERR(fc) Then Return PTR_ERR(fc)
2812  If subtype Then err = vfs_parse_fs_string(fc, "subtype", subtype, strlen - Find the length of a string*@s: The string to be sized)
2815  If Not err && name Then err = vfs_parse_fs_string(fc, "source", name, strlen - Find the length of a string*@s: The string to be sized)
2817  If Not err Then err = parse_monolithic_mount_data(fc, data)
2819  If Not err && Not mount_capable(fc) Then err = -EPERM
2821  If Not err Then err = 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
2823  If Not err Then err = Create a new mount using a superblock configuration and request it* be added to the namespace tree.
2826  put_fs_context - Dispose of a superblock configuration context.*@fc: The context to dispose of.
2827  Return err
Caller
NameDescribe
do_mountFlags is a 32-bit value that allows up to 31 non-fs dependent flags to* be given to the mount() call (ie: read-only, no-dev, no-suid etc)