diff mbox

fs: namei: rename __follow_mount_rcu to follow_mount_rcu

Message ID 20180226003310.5375-1-danilokrummrich@dk-develop.de (mailing list archive)
State New, archived
Headers show

Commit Message

Danilo Krummrich Feb. 26, 2018, 12:33 a.m. UTC
Commit 31e6b01f4183 ("fs: rcu-walk for path lookup") introduced
__follow_mount_rcu() without the presence of a name collision.

Later on follow_mount_rcu() was introduced in commit 287548e46aa7
("split __follow_mount_rcu() into normal and .. cases"), as these
cases have different requirements (e.g. mount traps).

In commit b37199e626b3 ("rcuwalk: recheck mount_lock after mountpoint
crossing attempts") the code of follow_mount_rcu() was moved within
follow_dotdot_rcu(), hence __follow_mount_rcu() can be renamed now.

Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
---
 fs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/fs/namei.c b/fs/namei.c
index 9cc91fb7f156..8da8bd516cf2 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1282,7 +1282,7 @@  static inline int managed_dentry_rcu(const struct path *path)
  * Try to skip to top of mountpoint pile in rcuwalk mode.  Fail if
  * we meet a managed dentry that would need blocking.
  */
-static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
+static bool follow_mount_rcu(struct nameidata *nd, struct path *path,
 			       struct inode **inode, unsigned *seqp)
 {
 	for (;;) {
@@ -1588,7 +1588,7 @@  static int lookup_fast(struct nameidata *nd,
 				return -ENOENT;
 			path->mnt = mnt;
 			path->dentry = dentry;
-			if (likely(__follow_mount_rcu(nd, path, inode, seqp)))
+			if (likely(follow_mount_rcu(nd, path, inode, seqp)))
 				return 1;
 		}
 		if (unlazy_child(nd, dentry, seq))
@@ -2265,7 +2265,7 @@  static int handle_lookup_down(struct nameidata *nd)
 		 * at the very beginning of walk, so we lose nothing
 		 * if we simply redo everything in non-RCU mode
 		 */
-		if (unlikely(!__follow_mount_rcu(nd, &path, &inode, &seq)))
+		if (unlikely(!follow_mount_rcu(nd, &path, &inode, &seq)))
 			return -ECHILD;
 	} else {
 		dget(path.dentry);