Lines Matching refs:mnt_flags

361 	return (mnt->mnt_flags & MNT_READONLY) || sb_rdonly(mnt->mnt_sb);  in __mnt_is_readonly()
689 mnt->mnt.mnt_flags |= MNT_READONLY; in mnt_make_readonly()
705 if (!(m->mnt.mnt_flags & MNT_READONLY)) { in sb_prepare_remount_readonly()
753 if (unlikely(bastard->mnt_flags & (MNT_SYNC_UMOUNT | MNT_DOOMED))) { in __legitimize_mnt()
1183 mnt->mnt.mnt_flags = MNT_INTERNAL; in vfs_create_mount()
1250 mnt->mnt.mnt_flags = READ_ONCE(old->mnt.mnt_flags) & in clone_mnt()
1353 if (unlikely(mnt->mnt.mnt_flags & MNT_DOOMED)) { in mntput_no_expire_slowpath()
1358 mnt->mnt.mnt_flags |= MNT_DOOMED; in mntput_no_expire_slowpath()
1375 if (likely(!(mnt->mnt.mnt_flags & MNT_INTERNAL))) { in mntput_no_expire_slowpath()
1476 p->mnt.mnt_flags |= MNT_INTERNAL; in mnt_clone_internal()
1752 if (!(mnt->mnt_parent->mnt.mnt_flags & MNT_UMOUNT)) in disconnect_mount()
1781 p->mnt.mnt_flags |= MNT_UMOUNT; in umount_tree()
1811 p->mnt.mnt_flags |= MNT_SYNC_UMOUNT; in umount_tree()
1941 if (mnt->mnt.mnt_flags & MNT_LOCKED) in do_umount()
1990 if (mnt->mnt.mnt_flags & MNT_UMOUNT) { in __detach_mounts()
2027 if (mnt->mnt.mnt_flags & MNT_LOCKED) /* Check optimistically */ in can_umount()
2183 if (src_mnt->mnt.mnt_flags & MNT_LOCKED) { in copy_tree()
2208 if (src_mnt->mnt.mnt_flags & MNT_LOCKED) in copy_tree()
2209 dst_mnt->mnt.mnt_flags |= MNT_LOCKED; in copy_tree()
2331 if (child->mnt.mnt_flags & MNT_LOCKED) in __has_locked_children()
2417 int flags = p->mnt.mnt_flags; in lock_mnt_tree()
2435 p->mnt.mnt_flags = flags; in lock_mnt_tree()
3129 if (mnt->mnt.mnt_flags & MNT_LOCKED) in create_new_namespace()
3147 mnt->mnt.mnt_flags |= MNT_LOCKED; in create_new_namespace()
3239 static bool can_change_locked_flags(struct mount *mnt, unsigned int mnt_flags) in can_change_locked_flags() argument
3241 unsigned int fl = mnt->mnt.mnt_flags; in can_change_locked_flags()
3244 !(mnt_flags & MNT_READONLY)) in can_change_locked_flags()
3248 !(mnt_flags & MNT_NODEV)) in can_change_locked_flags()
3252 !(mnt_flags & MNT_NOSUID)) in can_change_locked_flags()
3256 !(mnt_flags & MNT_NOEXEC)) in can_change_locked_flags()
3260 ((fl & MNT_ATIME_MASK) != (mnt_flags & MNT_ATIME_MASK))) in can_change_locked_flags()
3266 static int change_mount_ro_state(struct mount *mnt, unsigned int mnt_flags) in change_mount_ro_state() argument
3268 bool readonly_request = (mnt_flags & MNT_READONLY); in change_mount_ro_state()
3276 mnt->mnt.mnt_flags &= ~MNT_READONLY; in change_mount_ro_state()
3280 static void set_mount_attributes(struct mount *mnt, unsigned int mnt_flags) in set_mount_attributes() argument
3282 mnt_flags |= mnt->mnt.mnt_flags & ~MNT_USER_SETTABLE_MASK; in set_mount_attributes()
3283 mnt->mnt.mnt_flags = mnt_flags; in set_mount_attributes()
3322 static int do_reconfigure_mnt(const struct path *path, unsigned int mnt_flags) in do_reconfigure_mnt() argument
3334 if (!can_change_locked_flags(mnt, mnt_flags)) in do_reconfigure_mnt()
3343 ret = change_mount_ro_state(mnt, mnt_flags); in do_reconfigure_mnt()
3345 set_mount_attributes(mnt, mnt_flags); in do_reconfigure_mnt()
3360 int mnt_flags, void *data) in do_remount() argument
3373 if (!can_change_locked_flags(mnt, mnt_flags)) in do_remount()
3394 set_mount_attributes(mnt, mnt_flags); in do_remount()
3723 int mnt_flags) in do_add_mount() argument
3730 mnt_flags &= ~MNT_INTERNAL_FLAGS; in do_add_mount()
3734 if (!(mnt_flags & MNT_SHRINKABLE)) in do_add_mount()
3749 newmnt->mnt.mnt_flags = mnt_flags; in do_add_mount()
3760 unsigned int mnt_flags) in do_new_mount_fc() argument
3774 if (unlikely(mount_too_revealing(sb, &mnt_flags))) { in do_new_mount_fc()
3782 error = do_add_mount(real_mount(mnt), &mp, mnt_flags); in do_new_mount_fc()
3793 int sb_flags, int mnt_flags, in do_new_mount() argument
3839 err = do_new_mount_fc(fc, path, mnt_flags); in do_new_mount()
3903 err = do_add_mount(mnt, &mp, path->mnt->mnt_flags | MNT_SHRINKABLE); in finish_automount()
3981 if (!(mnt->mnt.mnt_flags & MNT_SHRINKABLE)) in select_submounts()
4087 unsigned int mnt_flags = 0, sb_flags; in path_mount() local
4111 mnt_flags |= MNT_RELATIME; in path_mount()
4115 mnt_flags |= MNT_NOSUID; in path_mount()
4117 mnt_flags |= MNT_NODEV; in path_mount()
4119 mnt_flags |= MNT_NOEXEC; in path_mount()
4121 mnt_flags |= MNT_NOATIME; in path_mount()
4123 mnt_flags |= MNT_NODIRATIME; in path_mount()
4125 mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME); in path_mount()
4127 mnt_flags |= MNT_READONLY; in path_mount()
4129 mnt_flags |= MNT_NOSYMFOLLOW; in path_mount()
4135 mnt_flags &= ~MNT_ATIME_MASK; in path_mount()
4136 mnt_flags |= path->mnt->mnt_flags & MNT_ATIME_MASK; in path_mount()
4149 return do_reconfigure_mnt(path, mnt_flags); in path_mount()
4151 return do_remount(path, sb_flags, mnt_flags, data_page); in path_mount()
4159 return do_new_mount(path, type_page, sb_flags, mnt_flags, dev_name, in path_mount()
4384 unsigned int mnt_flags = 0; in attr_flags_to_mnt_flags() local
4387 mnt_flags |= MNT_READONLY; in attr_flags_to_mnt_flags()
4389 mnt_flags |= MNT_NOSUID; in attr_flags_to_mnt_flags()
4391 mnt_flags |= MNT_NODEV; in attr_flags_to_mnt_flags()
4393 mnt_flags |= MNT_NOEXEC; in attr_flags_to_mnt_flags()
4395 mnt_flags |= MNT_NODIRATIME; in attr_flags_to_mnt_flags()
4397 mnt_flags |= MNT_NOSYMFOLLOW; in attr_flags_to_mnt_flags()
4399 return mnt_flags; in attr_flags_to_mnt_flags()
4414 unsigned int mnt_flags = 0; in SYSCALL_DEFINE3() local
4426 mnt_flags = attr_flags_to_mnt_flags(attr_flags); in SYSCALL_DEFINE3()
4432 mnt_flags |= MNT_NOATIME; in SYSCALL_DEFINE3()
4435 mnt_flags |= MNT_RELATIME; in SYSCALL_DEFINE3()
4461 if (mount_too_revealing(fc->root->d_sb, &mnt_flags)) { in SYSCALL_DEFINE3()
4476 new_mnt->mnt_flags = mnt_flags; in SYSCALL_DEFINE3()
4660 if (new_mnt->mnt.mnt_flags & MNT_LOCKED) in path_pivot_root()
4682 if (root_mnt->mnt.mnt_flags & MNT_LOCKED) { in path_pivot_root()
4683 new_mnt->mnt.mnt_flags |= MNT_LOCKED; in path_pivot_root()
4684 root_mnt->mnt.mnt_flags &= ~MNT_LOCKED; in path_pivot_root()
4748 unsigned int flags = mnt->mnt.mnt_flags; in recalc_flags()
4812 (mnt->mnt.mnt_flags & MNT_READONLY)) && in mnt_allow_writers()
4874 WRITE_ONCE(m->mnt.mnt_flags, flags); in mount_setattr_commit()
5212 unsigned int mnt_flags = READ_ONCE(mnt->mnt_flags); in mnt_to_attr_flags() local
5215 if (mnt_flags & MNT_READONLY) in mnt_to_attr_flags()
5217 if (mnt_flags & MNT_NOSUID) in mnt_to_attr_flags()
5219 if (mnt_flags & MNT_NODEV) in mnt_to_attr_flags()
5221 if (mnt_flags & MNT_NOEXEC) in mnt_to_attr_flags()
5223 if (mnt_flags & MNT_NODIRATIME) in mnt_to_attr_flags()
5225 if (mnt_flags & MNT_NOSYMFOLLOW) in mnt_to_attr_flags()
5228 if (mnt_flags & MNT_NOATIME) in mnt_to_attr_flags()
5230 else if (mnt_flags & MNT_RELATIME) in mnt_to_attr_flags()
6318 int mnt_flags; in mnt_already_visible() local
6330 mnt_flags = mnt->mnt.mnt_flags; in mnt_already_visible()
6334 mnt_flags |= MNT_LOCK_READONLY; in mnt_already_visible()
6339 if ((mnt_flags & MNT_LOCK_READONLY) && in mnt_already_visible()
6342 if ((mnt_flags & MNT_LOCK_ATIME) && in mnt_already_visible()
6343 ((mnt_flags & MNT_ATIME_MASK) != (new_flags & MNT_ATIME_MASK))) in mnt_already_visible()
6353 if (!(child->mnt.mnt_flags & MNT_LOCKED)) in mnt_already_visible()
6360 *new_mnt_flags |= mnt_flags & (MNT_LOCK_READONLY | \ in mnt_already_visible()
6400 return !(mnt->mnt_flags & MNT_NOSUID) && check_mnt(real_mount(mnt)) && in mnt_may_suid()