Loading fs/namei.c +4 −10 Original line number Diff line number Diff line Loading @@ -1737,7 +1737,7 @@ static inline int should_follow_link(struct nameidata *nd, struct path *link, { if (likely(!d_is_symlink(link->dentry))) return 0; if (!follow) if (!follow && !(nd->flags & LOOKUP_FOLLOW)) return 0; /* make sure that d_is_symlink above matches inode */ if (nd->flags & LOOKUP_RCU) { Loading Loading @@ -2248,12 +2248,7 @@ static inline int lookup_last(struct nameidata *nd) nd->flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY; nd->flags &= ~LOOKUP_PARENT; return walk_component(nd, nd->flags & LOOKUP_FOLLOW ? nd->depth ? WALK_PUT | WALK_GET : WALK_GET : 0); return walk_component(nd, nd->depth ? WALK_PUT : 0); } /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ Loading Loading @@ -2623,7 +2618,7 @@ mountpoint_last(struct nameidata *nd) if (nd->depth) put_link(nd); path.mnt = nd->path.mnt; error = should_follow_link(nd, &path, nd->flags & LOOKUP_FOLLOW, error = should_follow_link(nd, &path, 0, d_backing_inode(path.dentry), 0); if (unlikely(error)) return error; Loading Loading @@ -3319,8 +3314,7 @@ static int do_last(struct nameidata *nd, finish_lookup: if (nd->depth) put_link(nd); error = should_follow_link(nd, &path, nd->flags & LOOKUP_FOLLOW, inode, seq); error = should_follow_link(nd, &path, 0, inode, seq); if (unlikely(error)) return error; Loading Loading
fs/namei.c +4 −10 Original line number Diff line number Diff line Loading @@ -1737,7 +1737,7 @@ static inline int should_follow_link(struct nameidata *nd, struct path *link, { if (likely(!d_is_symlink(link->dentry))) return 0; if (!follow) if (!follow && !(nd->flags & LOOKUP_FOLLOW)) return 0; /* make sure that d_is_symlink above matches inode */ if (nd->flags & LOOKUP_RCU) { Loading Loading @@ -2248,12 +2248,7 @@ static inline int lookup_last(struct nameidata *nd) nd->flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY; nd->flags &= ~LOOKUP_PARENT; return walk_component(nd, nd->flags & LOOKUP_FOLLOW ? nd->depth ? WALK_PUT | WALK_GET : WALK_GET : 0); return walk_component(nd, nd->depth ? WALK_PUT : 0); } /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ Loading Loading @@ -2623,7 +2618,7 @@ mountpoint_last(struct nameidata *nd) if (nd->depth) put_link(nd); path.mnt = nd->path.mnt; error = should_follow_link(nd, &path, nd->flags & LOOKUP_FOLLOW, error = should_follow_link(nd, &path, 0, d_backing_inode(path.dentry), 0); if (unlikely(error)) return error; Loading Loading @@ -3319,8 +3314,7 @@ static int do_last(struct nameidata *nd, finish_lookup: if (nd->depth) put_link(nd); error = should_follow_link(nd, &path, nd->flags & LOOKUP_FOLLOW, inode, seq); error = should_follow_link(nd, &path, 0, inode, seq); if (unlikely(error)) return error; Loading