return 1;
}
-enum {WALK_FOLLOW = 1, WALK_MORE = 2};
+enum {WALK_FOLLOW = 1, WALK_MORE = 2, WALK_NOFOLLOW = 4};
/*
* Do we need to follow links? We _really_ want to be able
int flags, struct inode *inode, unsigned seq)
{
if (likely(!d_is_symlink(path->dentry)) ||
- !(flags & WALK_FOLLOW || nd->flags & LOOKUP_FOLLOW)) {
+ !((flags & WALK_FOLLOW) || (nd->flags & LOOKUP_FOLLOW)) ||
+ (flags & WALK_NOFOLLOW)) {
/* not a symlink or should not follow */
path_to_nameidata(path, nd);
nd->inode = inode;
err = handle_mounts(nd, nd->path.dentry, &path, &inode, &seq);
if (unlikely(err < 0))
return err;
- path_to_nameidata(&path, nd);
- nd->inode = inode;
- nd->seq = seq;
- return 0;
+ return step_into(nd, &path, WALK_NOFOLLOW, inode, seq);
}
/* Returns 0 and nd will be valid on success; Retuns error, otherwise. */