Skip to content
Snippets Groups Projects
Commit 0c8f7070 authored by Yang Sheng's avatar Yang Sheng
Browse files

Branch HEAD

b=17379

As adilger asked, remove the "out_release:" entirely.
parent 75bbc69e
No related branches found
No related tags found
No related merge requests found
...@@ -163,24 +163,16 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, ...@@ -163,24 +163,16 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry,
#endif #endif
CDEBUG(D_VFSTRACE, "VFS Op\n"); CDEBUG(D_VFSTRACE, "VFS Op\n");
#if THREAD_SIZE < 8192 /* Limit the recursive symlink depth to 5 instead of default
/* * 8 links when kernel has 4k stack to prevent stack overflow. */
* We set the limits recursive symlink to 5 if (THREAD_SIZE < 8192 && current->link_count >= 5) {
* instead of default 8 when kernel has 4k stack
* to prevent stack overflow.
*/
if (current->link_count >= 5) {
rc = -ELOOP; rc = -ELOOP;
GOTO(out_release, rc); } else {
ll_inode_size_lock(inode, 0);
rc = ll_readlink_internal(inode, &request, &symname);
ll_inode_size_unlock(inode, 0);
} }
#endif
ll_inode_size_lock(inode, 0);
rc = ll_readlink_internal(inode, &request, &symname);
ll_inode_size_unlock(inode, 0);
if (rc) { if (rc) {
#if THREAD_SIZE < 8192
out_release:
#endif
path_release(nd); /* Kernel assumes that ->follow_link() path_release(nd); /* Kernel assumes that ->follow_link()
releases nameidata on error */ releases nameidata on error */
GOTO(out, rc); GOTO(out, rc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment