aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index e3c4f112ebf7..6ff858c049c0 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1378,12 +1378,12 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
1378{ 1378{
1379 int res; 1379 int res;
1380 1380
1381 BUG_ON(nd->depth >= MAX_NESTED_LINKS);
1382 if (unlikely(current->link_count >= MAX_NESTED_LINKS)) { 1381 if (unlikely(current->link_count >= MAX_NESTED_LINKS)) {
1383 path_put_conditional(path, nd); 1382 path_put_conditional(path, nd);
1384 path_put(&nd->path); 1383 path_put(&nd->path);
1385 return -ELOOP; 1384 return -ELOOP;
1386 } 1385 }
1386 BUG_ON(nd->depth >= MAX_NESTED_LINKS);
1387 1387
1388 nd->depth++; 1388 nd->depth++;
1389 current->link_count++; 1389 current->link_count++;