All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH] vfs: Rename __is_local_mountpoint to is_local_mountpoint
Date: Mon, 24 Feb 2020 19:01:42 +0200	[thread overview]
Message-ID: <20200224170142.5604-1-nborisov@suse.com> (raw)

Current is_local_mountpoint is a simple wrapper with added d_mountpoint
check. However, the same check is the first thing which
__is_local_mountpoint performs. So remove the wrapper and promote the
private helper to is_local_mountpoint. No semantics changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/mount.h     | 9 +--------
 fs/namespace.c | 4 ++--
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/fs/mount.h b/fs/mount.h
index 711a4093e475..bdbd2ad79209 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -140,14 +140,7 @@ struct proc_mounts {
 
 extern const struct seq_operations mounts_op;
 
-extern bool __is_local_mountpoint(struct dentry *dentry);
-static inline bool is_local_mountpoint(struct dentry *dentry)
-{
-	if (!d_mountpoint(dentry))
-		return false;
-
-	return __is_local_mountpoint(dentry);
-}
+extern bool is_local_mountpoint(struct dentry *dentry);
 
 static inline bool is_anon_ns(struct mnt_namespace *ns)
 {
diff --git a/fs/namespace.c b/fs/namespace.c
index 85b5f7bea82e..6d1f00849ac6 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -649,7 +649,7 @@ struct vfsmount *lookup_mnt(const struct path *path)
 }
 
 /*
- * __is_local_mountpoint - Test to see if dentry is a mountpoint in the
+ * is_local_mountpoint - Test to see if dentry is a mountpoint in the
  *                         current mount namespace.
  *
  * The common case is dentries are not mountpoints at all and that
@@ -663,7 +663,7 @@ struct vfsmount *lookup_mnt(const struct path *path)
  * namespace not just a mount that happens to have some specified
  * parent mount.
  */
-bool __is_local_mountpoint(struct dentry *dentry)
+bool is_local_mountpoint(struct dentry *dentry)
 {
 	struct mnt_namespace *ns = current->nsproxy->mnt_ns;
 	struct mount *mnt;
-- 
2.17.1


             reply	other threads:[~2020-02-24 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 17:01 Nikolay Borisov [this message]
2020-02-24 17:18 ` [PATCH] vfs: Rename __is_local_mountpoint to is_local_mountpoint Al Viro
2020-02-24 17:32   ` Nikolay Borisov

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=20200224170142.5604-1-nborisov@suse.com \
    --to=nborisov@suse.com \
    --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 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.