Skip to contentSkip to conversation

fs: namei: rename __follow_mount_rcu to follow_mount_rcu

PATCH New Danilo Krummrich 1 participant 1 message Feb 26, 2018 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: namei: rename __follow_mount_rcu to follow_mount_rcu

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.

---
 fs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/namei.c +3 -3
index 9cc91fb7f156..8da8bd516cf2 100644
@@ -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);
Signature · 1 line
2.14.1