[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150312122331.d8c27baf40d56e764f223193@linux-foundation.org>
Date: Thu, 12 Mar 2015 12:23:31 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andrew Vagin <avagin@...allels.com>
Cc: Andrey Vagin <avagin@...nvz.org>, <linux-kernel@...r.kernel.org>,
<linux-fsdevel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jeff Layton <jlayton@...chiereds.net>,
"J. Bruce Fields" <bfields@...ldses.org>,
"Cyrill Gorcunov" <gorcunov@...nvz.org>,
Pavel Emelyanov <xemul@...allels.com>,
"Joe Perches" <joe@...ches.com>
Subject: Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X
On Thu, 12 Mar 2015 18:54:42 +0300 Andrew Vagin <avagin@...allels.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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists