diff --git a/[refs] b/[refs] index 1ad7fe787512..1201df8b897f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1e28038df98e186807ff55a49c1c26d33d530a5 +refs/heads/master: c99658fe970f442199733bcace1a00b087336a0d diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 976fc323272e..84f1ec3b4a5d 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1873,7 +1873,7 @@ struct file *do_filp_open(int dfd, const char *pathname, do_link: error = -ELOOP; - if (flag & O_NOFOLLOW) + if ((flag & O_NOFOLLOW) || count++ == 32) goto exit_dput; /* * This is subtle. Instead of calling do_follow_link() we do the @@ -1915,11 +1915,6 @@ struct file *do_filp_open(int dfd, const char *pathname, __putname(nd.last.name); goto exit; } - error = -ELOOP; - if (count++==32) { - __putname(nd.last.name); - goto exit; - } filp = do_last(&nd, &path, open_flag, flag, acc_mode, mode, pathname, &is_link); __putname(nd.last.name);