proc: kill the extra proc_readfd_common()->dir_emit_dots()
authorOleg Nesterov <[email protected]>
Sat, 24 Aug 2013 15:14:34 +0000 (17:14 +0200)
committerAl Viro <[email protected]>
Sat, 24 Aug 2013 16:10:22 +0000 (12:10 -0400)
proc_readfd_common() does dir_emit_dots() twice in a row,
we need to do this only once.

Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Al Viro <[email protected]>
fs/proc/fd.c

index 75f2890abbd8ddcc8a674b1c42397cc1456fd33e..0ff80f9b930f7226124e670c2814d7f4618d4532 100644 (file)
@@ -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);