Commit 7813b94a authored by Linus Torvalds's avatar Linus Torvalds

vfs: rename 'do_follow_link' to 'should_follow_link'

Al points out that the do_follow_link() helper function really is
misnamed - it's about whether we should try to follow a symlink or not,
not about actually doing the following.
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 206b1d09
...@@ -1267,7 +1267,7 @@ static void terminate_walk(struct nameidata *nd) ...@@ -1267,7 +1267,7 @@ static void terminate_walk(struct nameidata *nd)
* so we keep a cache of "no, this doesn't need follow_link" * so we keep a cache of "no, this doesn't need follow_link"
* for the common case. * for the common case.
*/ */
static inline int do_follow_link(struct inode *inode, int follow) static inline int should_follow_link(struct inode *inode, int follow)
{ {
if (unlikely(!(inode->i_opflags & IOP_NOFOLLOW))) { if (unlikely(!(inode->i_opflags & IOP_NOFOLLOW))) {
if (likely(inode->i_op->follow_link)) if (likely(inode->i_op->follow_link))
...@@ -1303,7 +1303,7 @@ static inline int walk_component(struct nameidata *nd, struct path *path, ...@@ -1303,7 +1303,7 @@ static inline int walk_component(struct nameidata *nd, struct path *path,
terminate_walk(nd); terminate_walk(nd);
return -ENOENT; return -ENOENT;
} }
if (do_follow_link(inode, follow)) { if (should_follow_link(inode, follow)) {
if (nd->flags & LOOKUP_RCU) { if (nd->flags & LOOKUP_RCU) {
if (unlikely(unlazy_walk(nd, path->dentry))) { if (unlikely(unlazy_walk(nd, path->dentry))) {
terminate_walk(nd); terminate_walk(nd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment