From 31fe39a30da74668fa4bb117f5b837610ef4722d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 24 Dec 2009 02:27:30 -0500 Subject: [PATCH] --- yaml --- r: 185921 b: refs/heads/master c: c99658fe970f442199733bcace1a00b087336a0d h: refs/heads/master i: 185919: 4d33d18d42334ab768b0fb73d81f708e6582cace v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) 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);