summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-18 05:02:40 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2015-05-11 04:20:14 +0200
commit44163f30059e9869451999e77109a37abba8c968 (patch)
treeaab3f380b7fd10bb434a4d704a04bc937b61feb2 /drivers
parentnamei: move link count check and stack allocation into pick_link() (diff)
downloadlinux-44163f30059e9869451999e77109a37abba8c968.tar.xz
linux-44163f30059e9869451999e77109a37abba8c968.zip
lustre: rip the private symlink nesting limit out
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/lustre/lustre/llite/symlink.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/staging/lustre/lustre/llite/symlink.c b/drivers/staging/lustre/lustre/llite/symlink.c
index e488cb3bb25d..da6d9d17c50d 100644
--- a/drivers/staging/lustre/lustre/llite/symlink.c
+++ b/drivers/staging/lustre/lustre/llite/symlink.c
@@ -126,18 +126,9 @@ static const char *ll_follow_link(struct dentry *dentry, void **cookie, struct n
char *symname = NULL;
CDEBUG(D_VFSTRACE, "VFS Op\n");
- /* Limit the recursive symlink depth to 5 instead of default
- * 8 links when kernel has 4k stack to prevent stack overflow.
- * For 8k stacks we need to limit it to 7 for local servers. */
- 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);
- }
+ ll_inode_size_lock(inode);
+ rc = ll_readlink_internal(inode, &request, &symname);
+ ll_inode_size_unlock(inode);
if (rc) {
ptlrpc_req_finished(request);
return ERR_PTR(rc);