Skip to content
Snippets Groups Projects
Commit 542edff1 authored by Andreas Dilger's avatar Andreas Dilger
Browse files

Branch b1_6

Quiet compiler warning about unused label.
Conditional check will be optimized away by compiler.
parent 99eee3f6
No related merge requests found
...@@ -167,22 +167,16 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, struct n ...@@ -167,22 +167,16 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, struct n
#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 {
down(&lli->lli_size_sem);
rc = ll_readlink_internal(inode, &request, &symname);
up(&lli->lli_size_sem);
} }
#endif
down(&lli->lli_size_sem);
rc = ll_readlink_internal(inode, &request, &symname);
up(&lli->lli_size_sem);
if (rc) { if (rc) {
out_release:
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