From: Seth Forshee <sforshee@kernel.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v4 4/4] fs: allow to mount beneath top mount
Date: Thu, 11 May 2023 07:19:36 -0700 [thread overview]
Message-ID: <ZFz5eI9WoWzMvXS3@do-x1extreme> (raw)
In-Reply-To: <20230202-fs-move-mount-replace-v4-4-98f3d80d7eaa@kernel.org>
On Wed, May 03, 2023 at 01:18:42PM +0200, Christian Brauner wrote:
> +/**
> + * do_lock_mount - lock mount and mountpoint
> + * @path: target path
> + * @beneath: whether the intention is to mount beneath @path
> + *
> + * Follow the mount stack on @path until the top mount @mnt is found. If
> + * the initial @path->{mnt,dentry} is a mountpoint lookup the first
> + * mount stacked on top of it. Then simply follow @{mnt,mnt->mnt_root}
> + * until nothing is stacked on top of it anymore.
> + *
> + * Acquire the inode_lock() on the top mount's ->mnt_root to protect
> + * against concurrent removal of the new mountpoint from another mount
> + * namespace.
> + *
> + * If @beneath is requested, acquire inode_lock() on @mnt's mountpoint
> + * @mp on @mnt->mnt_parent must be acquired. This protects against a
Redundant use of "acquire" here.
next prev parent reply other threads:[~2023-05-11 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 11:18 [PATCH v4 0/4] fs: allow to mount beneath top mount Christian Brauner
2023-05-03 11:18 ` [PATCH v4 1/4] fs: add path_mounted() Christian Brauner
2023-05-03 11:18 ` [PATCH v4 2/4] fs: properly document __lookup_mnt() Christian Brauner
2023-05-03 11:18 ` [PATCH v4 3/4] fs: use a for loop when locking a mount Christian Brauner
2023-05-03 11:18 ` [PATCH v4 4/4] fs: allow to mount beneath top mount Christian Brauner
2023-05-11 14:19 ` Seth Forshee [this message]
2023-05-11 14:17 ` [PATCH v4 0/4] " Seth Forshee
2023-05-19 10:52 ` Christian Brauner
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=ZFz5eI9WoWzMvXS3@do-x1extreme \
--to=sforshee@kernel.org \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox