From 16810449e637f1d5025cc26dfc5653ff30771d7a Mon Sep 17 00:00:00 2001 From: yangsheng Date: Wed, 12 Nov 2008 08:43:40 +0000 Subject: [PATCH] Branch b1_8_gate b=17379 As adilger asked, get rid of the "out_release" entirely. --- lustre/llite/symlink.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c index 28089fd..7edc38e 100644 --- a/lustre/llite/symlink.c +++ b/lustre/llite/symlink.c @@ -167,24 +167,16 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, struct n #endif CDEBUG(D_VFSTRACE, "VFS Op\n"); -#if THREAD_SIZE < 8192 - /* - * We set the limits recursive symlink to 5 - * instead of default 8 when kernel has 4k stack - * to prevent stack overflow. - */ - if (current->link_count >= 5) { + /* Limit the recursive symlink depth to 5 instead of default + * 8 links when kernel has 4k stack to prevent stack overflow. */ + if (THREAD_SIZE < 8192 && current->link_count >= 5) { 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 THREAD_SIZE < 8192 -out_release: -#endif path_release(nd); /* Kernel assumes that ->follow_link() releases nameidata on error */ GOTO(out, rc); -- 1.8.3.1