Function report |
Source Code:fs\namespace.c |
Create Date:2022-07-28 20:09:19 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Flags 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)
Proto:long do_mount(const char *dev_name, const char __user *dir_name, const char *type_page, unsigned long flags, void *data_page)
Type:long
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | dev_name | |
const char __user * | dir_name | |
const char * | type_page | |
unsigned long | flags | |
void * | data_page |
3065 | mnt_flags = 0 |
3066 | retval = 0 |
3069 | If (flags & MS_MGC_MSK) == Old magic mount flag and mask Then flags &= ~MS_MGC_MSK |
3073 | If data_page Then ) = 0 |
3080 | retval = user_path_at(Special value used to indicateopenat should use the currentworking directory. , dir_name, llow links at the end , & path) |
3086 | If Not retval && Not Is the caller allowed to modify his namespace? Then retval = -EPERM |
3088 | If Not retval && flags & Allow mandatory locks on an FS && Not may_mandlock() Then retval = -EPERM |
3094 | If Not (flags & Do not update access times. ) Then mnt_flags |= MNT_RELATIME |
3098 | If flags & Ignore suid and sgid bits Then mnt_flags |= MNT_NOSUID |
3100 | If flags & Disallow access to device special files Then mnt_flags |= MNT_NODEV |
3102 | If flags & Disallow program execution Then mnt_flags |= MNT_NOEXEC |
3104 | If flags & Do not update access times. Then mnt_flags |= MNT_NOATIME |
3106 | If flags & Do not update directory access times Then mnt_flags |= MNT_NODIRATIME |
3108 | If flags & Always perform atime updates Then mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME) |
3110 | If flags & Mount read-only Then mnt_flags |= does the user want this to be r/o? |
3114 | If flags & Alter flags of a mounted FS && (flags & ( Do not update access times. | Do not update directory access times | Update atime relative to mtime/ctime. | Always perform atime updates )) == 0 Then |
3117 | mnt_flags &= ~MNT_ATIME_MASK |
3118 | mnt_flags |= mnt_flags & MNT_ATIME_MASK |
3135 | Else if flags & MS_BIND Then retval = do loopback mount. |
3137 | Else if flags & ( change to shared | change to private | change to slave | change to unbindable ) Then retval = rsively change the type of the mountpoint. |
3141 | Else retval = reate a new mount for userspace and request it to be added into the* namespace's tree |
3144 | dput_out : |
3146 | Return retval |
Name | Describe |
---|---|
prepare_namespace | Prepare the namespace - decide what/where to mount, load ramdisks, etc. |
init_linuxrc | |
handle_initrd | |
SYSCALL_DEFINE5 | |
COMPAT_SYSCALL_DEFINE5 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |