From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, Christian Brauner <brauner@kernel.org>
Subject: [git pull] pile 1: mount stuff
Date: Thu, 2 Oct 2025 06:54:37 +0100 [thread overview]
Message-ID: <20251002055437.GG39973@ZenIV> (raw)
My apologies for being that late with pull requests - went down
with flu last week, took that long to get back to normal ;-/
Several piles this cycle, this one being the largest and trickiest.
There are several trivial conflicts in fs/namespace.c; I've pushed a conflict
resolution variant into #proposed.merge.
The following changes since commit 38f4885088fc5ad41b8b0a2a2cfc73d01e709e5c:
mnt_ns_tree_remove(): DTRT if mnt_ns had never been added to mnt_ns_list (2025-09-16 00:33:37 -0400)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-mount
for you to fetch changes up to a79765248649de77771c24f7be08ff4c96f16f7a:
constify {__,}mnt_is_readonly() (2025-09-17 15:58:29 -0400)
----------------------------------------------------------------
mount-related stuff for this cycle
* saner handling of guards in fs/namespace.c, getting
rid of needlessly strong locking in some of the users.
* lock_mount() calling conventions change - have it set
the environment for attaching to given location, storing the
results in caller-supplied object, without altering the passed
struct path. Make unlock_mount() called as __cleanup for those
objects. It's not exactly guard(), but similar to it.
* MNT_WRITE_HOLD done right - mnt_hold_writers() does *not*
mess with ->mnt_flags anymore, so insertion of a new mount into
->s_mounts of underlying superblock does not, in itself, expose
->mnt_flags of that mount to concurrent modifications.
* getting rid of pathological cases when umount() spends
quadratic time removing the victims from propagation graph -
part of that had been dealt with last cycle, this should finish
it.
* a bunch of stuff constified.
* assorted cleanups.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----------------------------------------------------------------
Al Viro (65):
fs/namespace.c: fix the namespace_sem guard mess
introduced guards for mount_lock
fs/namespace.c: allow to drop vfsmount references via __free(mntput)
__detach_mounts(): use guards
__is_local_mountpoint(): use guards
do_change_type(): use guards
do_set_group(): use guards
mark_mounts_for_expiry(): use guards
put_mnt_ns(): use guards
mnt_already_visible(): use guards
check_for_nsfs_mounts(): no need to take locks
propagate_mnt(): use scoped_guard(mount_locked_reader) for mnt_set_mountpoint()
has_locked_children(): use guards
mnt_set_expiry(): use guards
path_is_under(): use guards
current_chrooted(): don't bother with follow_down_one()
current_chrooted(): use guards
switch do_new_mount_fc() to fc_mount()
do_move_mount(): trim local variables
do_move_mount(): deal with the checks on old_path early
move_mount(2): take sanity checks in 'beneath' case into do_lock_mount()
finish_automount(): simplify the ELOOP check
do_loopback(): use __free(path_put) to deal with old_path
pivot_root(2): use __free() to deal with struct path in it
finish_automount(): take the lock_mount() analogue into a helper
do_new_mount_fc(): use __free() to deal with dropping mnt on failure
finish_automount(): use __free() to deal with dropping mnt on failure
change calling conventions for lock_mount() et.al.
do_move_mount(): use the parent mount returned by do_lock_mount()
do_add_mount(): switch to passing pinned_mountpoint instead of mountpoint + path
graft_tree(), attach_recursive_mnt() - pass pinned_mountpoint
pivot_root(2): use old_mp.mp->m_dentry instead of old.dentry
don't bother passing new_path->dentry to can_move_mount_beneath()
new helper: topmost_overmount()
do_lock_mount(): don't modify path.
constify check_mnt()
do_mount_setattr(): constify path argument
do_set_group(): constify path arguments
drop_collected_paths(): constify arguments
collect_paths(): constify the return value
do_move_mount(), vfs_move_mount(), do_move_mount_old(): constify struct path argument(s)
mnt_warn_timestamp_expiry(): constify struct path argument
do_new_mount{,_fc}(): constify struct path argument
do_{loopback,change_type,remount,reconfigure_mnt}(): constify struct path argument
path_mount(): constify struct path argument
may_copy_tree(), __do_loopback(): constify struct path argument
path_umount(): constify struct path argument
constify can_move_mount_beneath() arguments
do_move_mount_old(): use __free(path_put)
do_mount(): use __free(path_put)
umount_tree(): take all victims out of propagation graph at once
ecryptfs: get rid of pointless mount references in ecryptfs dentries
fs/namespace.c: sanitize descriptions for {__,}lookup_mnt()
path_has_submounts(): use guard(mount_locked_reader)
open_detached_copy(): don't bother with mount_lock_hash()
open_detached_copy(): separate creation of namespace into helper
Merge branch 'no-rebase-mnt_ns_tree_remove' into work.mount
copy_mnt_ns(): use the regular mechanism for freeing empty mnt_ns on failure
copy_mnt_ns(): use guards
simplify the callers of mnt_unhold_writers()
setup_mnt(): primitive for connecting a mount to filesystem
preparations to taking MNT_WRITE_HOLD out of ->mnt_flags
struct mount: relocate MNT_WRITE_HOLD bit
WRITE_HOLD machinery: no need for to bump mount_lock seqcount
constify {__,}mnt_is_readonly()
fs/dcache.c | 4 +-
fs/ecryptfs/dentry.c | 14 +-
fs/ecryptfs/ecryptfs_kernel.h | 27 +-
fs/ecryptfs/file.c | 15 +-
fs/ecryptfs/inode.c | 19 +-
fs/ecryptfs/main.c | 24 +-
fs/internal.h | 4 +-
fs/mount.h | 39 +-
fs/namespace.c | 992 +++++++++++++++++++-----------------------
fs/pnode.c | 75 +++-
fs/pnode.h | 1 +
fs/super.c | 3 +-
include/linux/fs.h | 4 +-
include/linux/mount.h | 9 +-
kernel/audit_tree.c | 12 +-
15 files changed, 600 insertions(+), 642 deletions(-)
next reply other threads:[~2025-10-02 5:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 5:54 Al Viro [this message]
2025-10-03 17:45 ` [git pull] pile 1: mount stuff Linus Torvalds
2025-10-03 21:13 ` Al Viro
2025-10-03 21:19 ` Linus Torvalds
2025-10-03 18:41 ` pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251002055437.GG39973@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.