Skip to contentSkip to conversation

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

PATCH In review Oleg Nesterov 2 participants 2 messages Aug 24, 2013 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/proc/fd.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
fs/proc/fd.c +0 -2
index 75f2890..0ff80f9 100644
@@ -230,8 +230,6 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,
 
 	if (!dir_emit_dots(file, ctx))
 		goto out;
-	if (!dir_emit_dots(file, ctx))
-		goto out;
 	files = get_files_struct(p);
 	if (!files)
 		goto out;
Signature · 1 line
1.5.5.1
#1 lore raw
Quoted 2 lines · Oleg Nesterov

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

I really wonder how that one had happened - it's harmless, fortunately, but... Ugh. Applied, will push to Linus today