diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-07-05 00:38:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-17 15:58:28 -0400 |
commit | 5d132cfafb6a86740e65177c79fd5d7b02613383 (patch) | |
tree | 6ad27d1760753189f2c2b9a7f92daf007b0b95b2 /rust/helpers/signal.c | |
parent | 7f954a6f491088f18a6c7c975da8ddc8c003e518 (diff) |
setup_mnt(): primitive for connecting a mount to filesystem
Take the identical logics in vfs_create_mount() and clone_mnt() into
a new helper that takes an empty struct mount and attaches it to
given dentry (sub)tree.
Should be called once in the lifetime of every mount, prior to making
it visible in any data structures.
After that point ->mnt_root and ->mnt_sb never change; ->mnt_root
is a counting reference to dentry and ->mnt_sb - an active reference
to superblock.
Mount remains associated with that dentry tree all the way until
the call of cleanup_mnt(), when the refcount eventually drops
to zero.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'rust/helpers/signal.c')
0 files changed, 0 insertions, 0 deletions