diff --git a/fs/namei.c b/fs/namei.c index 08da937b1ee244212eff3cb4a97c4241f6d3ab2f..adfbaf5c04a7669d0d143e027895fa72c7f8f796 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1819,7 +1819,9 @@ struct file *do_filp_open(int dfd, const char *pathname, return ERR_PTR(error); if (force_reval) nd.flags |= LOOKUP_REVAL; - error = path_walk(pathname, &nd); + + current->total_link_count = 0; + error = link_path_walk(pathname, &nd); if (error) { filp = ERR_PTR(error); goto out;