Commit 44163f30 authored by Al Viro's avatar Al Viro

lustre: rip the private symlink nesting limit out

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 626de996
...@@ -126,18 +126,9 @@ static const char *ll_follow_link(struct dentry *dentry, void **cookie, struct n ...@@ -126,18 +126,9 @@ static const char *ll_follow_link(struct dentry *dentry, void **cookie, struct n
char *symname = NULL; char *symname = NULL;
CDEBUG(D_VFSTRACE, "VFS Op\n"); CDEBUG(D_VFSTRACE, "VFS Op\n");
/* Limit the recursive symlink depth to 5 instead of default ll_inode_size_lock(inode);
* 8 links when kernel has 4k stack to prevent stack overflow. rc = ll_readlink_internal(inode, &request, &symname);
* For 8k stacks we need to limit it to 7 for local servers. */ ll_inode_size_unlock(inode);
if (THREAD_SIZE < 8192 && current->link_count >= 6) {
rc = -ELOOP;
} else if (THREAD_SIZE == 8192 && current->link_count >= 8) {
rc = -ELOOP;
} else {
ll_inode_size_lock(inode);
rc = ll_readlink_internal(inode, &request, &symname);
ll_inode_size_unlock(inode);
}
if (rc) { if (rc) {
ptlrpc_req_finished(request); ptlrpc_req_finished(request);
return ERR_PTR(rc); return ERR_PTR(rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment