Lines Matching refs:mnt_flags

248 	return (mnt->mnt_flags & MNT_READONLY) || sb_rdonly(mnt->mnt_sb);  in __mnt_is_readonly()
324 while (READ_ONCE(mnt->mnt.mnt_flags) & MNT_WRITE_HOLD) in __mnt_want_write()
467 mnt->mnt.mnt_flags |= MNT_WRITE_HOLD; in mnt_make_readonly()
493 mnt->mnt.mnt_flags |= MNT_READONLY; in mnt_make_readonly()
499 mnt->mnt.mnt_flags &= ~MNT_WRITE_HOLD; in mnt_make_readonly()
507 mnt->mnt.mnt_flags &= ~MNT_READONLY; in __mnt_unmake_readonly()
523 if (!(mnt->mnt.mnt_flags & MNT_READONLY)) { in sb_prepare_remount_readonly()
524 mnt->mnt.mnt_flags |= MNT_WRITE_HOLD; in sb_prepare_remount_readonly()
540 if (mnt->mnt.mnt_flags & MNT_WRITE_HOLD) in sb_prepare_remount_readonly()
541 mnt->mnt.mnt_flags &= ~MNT_WRITE_HOLD; in sb_prepare_remount_readonly()
575 if (bastard->mnt_flags & MNT_SYNC_UMOUNT) { in __legitimize_mnt()
580 if (unlikely(bastard->mnt_flags & MNT_DOOMED)) { in __legitimize_mnt()
945 mnt->mnt.mnt_flags = MNT_INTERNAL; in vfs_create_mount()
1038 mnt->mnt.mnt_flags = old->mnt.mnt_flags; in clone_mnt()
1039 mnt->mnt.mnt_flags &= ~(MNT_WRITE_HOLD|MNT_MARKED|MNT_INTERNAL); in clone_mnt()
1154 if (unlikely(mnt->mnt.mnt_flags & MNT_DOOMED)) { in mntput_no_expire()
1159 mnt->mnt.mnt_flags |= MNT_DOOMED; in mntput_no_expire()
1174 if (likely(!(mnt->mnt.mnt_flags & MNT_INTERNAL))) { in mntput_no_expire()
1243 p->mnt.mnt_flags |= MNT_INTERNAL; in mnt_clone_internal()
1408 if (!(mnt->mnt_parent->mnt.mnt_flags & MNT_UMOUNT)) in disconnect_mount()
1437 p->mnt.mnt_flags |= MNT_UMOUNT; in umount_tree()
1463 p->mnt.mnt_flags |= MNT_SYNC_UMOUNT; in umount_tree()
1579 if (mnt->mnt.mnt_flags & MNT_LOCKED) in do_umount()
1626 if (mnt->mnt.mnt_flags & MNT_UMOUNT) { in __detach_mounts()
1692 if (mnt->mnt.mnt_flags & MNT_LOCKED) /* Check optimistically */ in ksys_umount()
1775 if (s->mnt.mnt_flags & MNT_LOCKED) { in copy_tree()
1906 int flags = p->mnt.mnt_flags; in lock_mnt_tree()
1924 p->mnt.mnt_flags = flags; in lock_mnt_tree()
2103 child->mnt.mnt_flags &= ~MNT_LOCKED; in attach_recursive_mnt()
2241 if (child->mnt.mnt_flags & MNT_LOCKED) in has_locked_children()
2266 mnt->mnt.mnt_flags &= ~MNT_LOCKED; in __do_loopback()
2416 static bool can_change_locked_flags(struct mount *mnt, unsigned int mnt_flags) in can_change_locked_flags() argument
2418 unsigned int fl = mnt->mnt.mnt_flags; in can_change_locked_flags()
2421 !(mnt_flags & MNT_READONLY)) in can_change_locked_flags()
2425 !(mnt_flags & MNT_NODEV)) in can_change_locked_flags()
2429 !(mnt_flags & MNT_NOSUID)) in can_change_locked_flags()
2433 !(mnt_flags & MNT_NOEXEC)) in can_change_locked_flags()
2437 ((fl & MNT_ATIME_MASK) != (mnt_flags & MNT_ATIME_MASK))) in can_change_locked_flags()
2443 static int change_mount_ro_state(struct mount *mnt, unsigned int mnt_flags) in change_mount_ro_state() argument
2445 bool readonly_request = (mnt_flags & MNT_READONLY); in change_mount_ro_state()
2460 static void set_mount_attributes(struct mount *mnt, unsigned int mnt_flags) in set_mount_attributes() argument
2463 mnt_flags |= mnt->mnt.mnt_flags & ~MNT_USER_SETTABLE_MASK; in set_mount_attributes()
2464 mnt->mnt.mnt_flags = mnt_flags; in set_mount_attributes()
2496 static int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags) in do_reconfigure_mnt() argument
2508 if (!can_change_locked_flags(mnt, mnt_flags)) in do_reconfigure_mnt()
2512 ret = change_mount_ro_state(mnt, mnt_flags); in do_reconfigure_mnt()
2514 set_mount_attributes(mnt, mnt_flags); in do_reconfigure_mnt()
2528 int mnt_flags, void *data) in do_remount() argument
2541 if (!can_change_locked_flags(mnt, mnt_flags)) in do_remount()
2555 set_mount_attributes(mnt, mnt_flags); in do_remount()
2632 if (old->mnt.mnt_flags & MNT_LOCKED) in do_move_mount()
2700 static int do_add_mount(struct mount *newmnt, struct path *path, int mnt_flags) in do_add_mount() argument
2706 mnt_flags &= ~MNT_INTERNAL_FLAGS; in do_add_mount()
2716 if (!(mnt_flags & MNT_SHRINKABLE)) in do_add_mount()
2733 newmnt->mnt.mnt_flags = mnt_flags; in do_add_mount()
2748 unsigned int mnt_flags) in do_new_mount_fc() argument
2755 if (!error && mount_too_revealing(sb, &mnt_flags)) in do_new_mount_fc()
2771 error = do_add_mount(real_mount(mnt), mountpoint, mnt_flags); in do_new_mount_fc()
2782 int mnt_flags, const char *name, void *data) in do_new_mount() argument
2824 err = do_new_mount_fc(fc, path, mnt_flags); in do_new_mount()
2845 err = do_add_mount(mnt, path, path->mnt->mnt_flags | MNT_SHRINKABLE); in finish_automount()
2934 if (!(mnt->mnt.mnt_flags & MNT_SHRINKABLE)) in select_submounts()
3065 unsigned int mnt_flags = 0, sb_flags; in do_mount() local
3095 mnt_flags |= MNT_RELATIME; in do_mount()
3099 mnt_flags |= MNT_NOSUID; in do_mount()
3101 mnt_flags |= MNT_NODEV; in do_mount()
3103 mnt_flags |= MNT_NOEXEC; in do_mount()
3105 mnt_flags |= MNT_NOATIME; in do_mount()
3107 mnt_flags |= MNT_NODIRATIME; in do_mount()
3109 mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME); in do_mount()
3111 mnt_flags |= MNT_READONLY; in do_mount()
3117 mnt_flags &= ~MNT_ATIME_MASK; in do_mount()
3118 mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK; in do_mount()
3131 retval = do_reconfigure_mnt(&path, mnt_flags); in do_mount()
3133 retval = do_remount(&path, flags, sb_flags, mnt_flags, in do_mount()
3142 retval = do_new_mount(&path, type_page, sb_flags, mnt_flags, in do_mount()
3381 unsigned int mnt_flags = 0; in SYSCALL_DEFINE3() local
3399 mnt_flags |= MNT_READONLY; in SYSCALL_DEFINE3()
3401 mnt_flags |= MNT_NOSUID; in SYSCALL_DEFINE3()
3403 mnt_flags |= MNT_NODEV; in SYSCALL_DEFINE3()
3405 mnt_flags |= MNT_NOEXEC; in SYSCALL_DEFINE3()
3407 mnt_flags |= MNT_NODIRATIME; in SYSCALL_DEFINE3()
3413 mnt_flags |= MNT_NOATIME; in SYSCALL_DEFINE3()
3416 mnt_flags |= MNT_RELATIME; in SYSCALL_DEFINE3()
3442 if (mount_too_revealing(fc->root->d_sb, &mnt_flags)) { in SYSCALL_DEFINE3()
3461 newmount.mnt->mnt_flags = mnt_flags; in SYSCALL_DEFINE3()
3659 if (new_mnt->mnt.mnt_flags & MNT_LOCKED) in SYSCALL_DEFINE2()
3685 if (root_mnt->mnt.mnt_flags & MNT_LOCKED) { in SYSCALL_DEFINE2()
3686 new_mnt->mnt.mnt_flags |= MNT_LOCKED; in SYSCALL_DEFINE2()
3687 root_mnt->mnt.mnt_flags &= ~MNT_LOCKED; in SYSCALL_DEFINE2()
3739 mnt->mnt_flags |= MNT_LOCKED; in init_mount_tree()
3854 int mnt_flags; in mnt_already_visible() local
3866 mnt_flags = mnt->mnt.mnt_flags; in mnt_already_visible()
3870 mnt_flags |= MNT_LOCK_READONLY; in mnt_already_visible()
3875 if ((mnt_flags & MNT_LOCK_READONLY) && in mnt_already_visible()
3878 if ((mnt_flags & MNT_LOCK_ATIME) && in mnt_already_visible()
3879 ((mnt_flags & MNT_ATIME_MASK) != (new_flags & MNT_ATIME_MASK))) in mnt_already_visible()
3889 if (!(child->mnt.mnt_flags & MNT_LOCKED)) in mnt_already_visible()
3896 *new_mnt_flags |= mnt_flags & (MNT_LOCK_READONLY | \ in mnt_already_visible()
3939 return !(mnt->mnt_flags & MNT_NOSUID) && check_mnt(real_mount(mnt)) && in mnt_may_suid()