Loading fs/namei.c +6 −8 Original line number Original line Diff line number Diff line Loading @@ -2320,11 +2320,12 @@ static struct file *path_openat(int dfd, const char *pathname, struct path link = path; struct path link = path; struct inode *linki = link.dentry->d_inode; struct inode *linki = link.dentry->d_inode; void *cookie; void *cookie; error = -ELOOP; if (!(nd.flags & LOOKUP_FOLLOW) || count++ == 32) { if (!(nd.flags & LOOKUP_FOLLOW)) path_put_conditional(&path, &nd); goto exit_dput; path_put(&nd.path); if (count++ == 32) filp = ERR_PTR(-ELOOP); goto exit_dput; break; } /* /* * This is subtle. Instead of calling do_follow_link() we do * This is subtle. Instead of calling do_follow_link() we do * the thing by hands. The reason is that this way we have zero * the thing by hands. The reason is that this way we have zero Loading Loading @@ -2355,9 +2356,6 @@ static struct file *path_openat(int dfd, const char *pathname, release_open_intent(&nd); release_open_intent(&nd); return filp; return filp; exit_dput: path_put_conditional(&path, &nd); path_put(&nd.path); out_filp: out_filp: filp = ERR_PTR(error); filp = ERR_PTR(error); goto out; goto out; Loading Loading
fs/namei.c +6 −8 Original line number Original line Diff line number Diff line Loading @@ -2320,11 +2320,12 @@ static struct file *path_openat(int dfd, const char *pathname, struct path link = path; struct path link = path; struct inode *linki = link.dentry->d_inode; struct inode *linki = link.dentry->d_inode; void *cookie; void *cookie; error = -ELOOP; if (!(nd.flags & LOOKUP_FOLLOW) || count++ == 32) { if (!(nd.flags & LOOKUP_FOLLOW)) path_put_conditional(&path, &nd); goto exit_dput; path_put(&nd.path); if (count++ == 32) filp = ERR_PTR(-ELOOP); goto exit_dput; break; } /* /* * This is subtle. Instead of calling do_follow_link() we do * This is subtle. Instead of calling do_follow_link() we do * the thing by hands. The reason is that this way we have zero * the thing by hands. The reason is that this way we have zero Loading Loading @@ -2355,9 +2356,6 @@ static struct file *path_openat(int dfd, const char *pathname, release_open_intent(&nd); release_open_intent(&nd); return filp; return filp; exit_dput: path_put_conditional(&path, &nd); path_put(&nd.path); out_filp: out_filp: filp = ERR_PTR(error); filp = ERR_PTR(error); goto out; goto out; Loading