linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andrew Vagin <avagin@parallels.com>
Cc: Andrey Vagin <avagin@openvz.org>, <linux-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jeff Layton <jlayton@poochiereds.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	"Cyrill Gorcunov" <gorcunov@openvz.org>,
	Pavel Emelyanov <xemul@parallels.com>,
	"Joe Perches" <joe@perches.com>
Subject: Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X
Date: Thu, 12 Mar 2015 12:23:31 -0700	[thread overview]
Message-ID: <20150312122331.d8c27baf40d56e764f223193@linux-foundation.org> (raw)
In-Reply-To: <20150312155441.GA19139@paralelels.com>

On Thu, 12 Mar 2015 18:54:42 +0300 Andrew Vagin <avagin@parallels.com> wrote:

> v2: use seq_has_overflowed() properly

--- a/fs/proc/fd.c~proc-show-locks-in-proc-pid-fdinfo-x-v2
+++ a/fs/proc/fd.c
@@ -57,17 +57,15 @@ static int seq_show(struct seq_file *m,
 		   real_mount(file->f_path.mnt)->mnt_id);
 
 	show_fd_locks(m, file, files);
-	ret = seq_has_overflowed(m);
-	if (ret)
+	if (seq_has_overflowed(m))
 		goto out;
 
 	if (file->f_op->show_fdinfo)
 		file->f_op->show_fdinfo(m, file);
-	ret = seq_has_overflowed(m);
 
 out:
 	fput(file);
-	return ret;
+	return 0;
 }
 
 static int seq_fdinfo_open(struct inode *inode, struct file *file)


So it returns "success" when the output has overflowed?  Why this,
rather than returning an error?

  reply	other threads:[~2015-03-12 19:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 15:37 [PATCH] proc: show locks in /proc/pid/fdinfo/X Andrey Vagin
2015-03-05 19:11 ` Jeff Layton
2015-03-06 14:19   ` Andrew Vagin
2015-03-06  8:38 ` Cyrill Gorcunov
2015-03-06 14:41 ` J. Bruce Fields
2015-03-07 13:00   ` Jeff Layton
2015-03-11 22:08 ` Andrew Morton
2015-03-12 15:54   ` Andrew Vagin
2015-03-12 19:23     ` Andrew Morton [this message]
2015-03-12 21:31       ` Andrey Wagin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150312122331.d8c27baf40d56e764f223193@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=avagin@parallels.com \
    --cc=bfields@fieldses.org \
    --cc=corbet@lwn.net \
    --cc=gorcunov@openvz.org \
    --cc=jlayton@poochiereds.net \
    --cc=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).