public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] proc: kill the extra proc_readfd_common()->dir_emit_dots()
@ 2013-08-24 15:14 Oleg Nesterov
  2013-08-24 15:25 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2013-08-24 15:14 UTC (permalink / raw)
  To: Al Viro, Andrew Morton; +Cc: Eric W. Biederman, linux-kernel

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>
---
 fs/proc/fd.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 75f2890..0ff80f9 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -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;
-- 
1.5.5.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] proc: kill the extra proc_readfd_common()->dir_emit_dots()
  2013-08-24 15:14 [PATCH] proc: kill the extra proc_readfd_common()->dir_emit_dots() Oleg Nesterov
@ 2013-08-24 15:25 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2013-08-24 15:25 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andrew Morton, Eric W. Biederman, linux-kernel

On Sat, Aug 24, 2013 at 05:14:34PM +0200, Oleg Nesterov wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-24 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-24 15:14 [PATCH] proc: kill the extra proc_readfd_common()->dir_emit_dots() Oleg Nesterov
2013-08-24 15:25 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox