From: Oleg Nesterov <oleg@redhat.com>
Date: Sat, 24 Aug 2013 15:14:34 +0000 (+0200)
Subject: proc: kill the extra proc_readfd_common()->dir_emit_dots()
X-Git-Tag: firefly_0821_release~176^2~5429^2~29
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a5a1955e0c2d4d325fabdf6b09aa3f9d33e78a10;p=firefly-linux-kernel-4.4.55.git

proc: kill the extra proc_readfd_common()->dir_emit_dots()

proc_readfd_common() does dir_emit_dots() twice in a row,
we need to do this only once.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---

diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 75f2890abbd8..0ff80f9b930f 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -228,8 +228,6 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,
 	if (!p)
 		return -ENOENT;
 
-	if (!dir_emit_dots(file, ctx))
-		goto out;
 	if (!dir_emit_dots(file, ctx))
 		goto out;
 	files = get_files_struct(p);