fs: Convert show_fdinfo functions to void

seq_printf functions shouldn't really check the return value.
Checking seq_has_overflowed() occasionally is used instead.

Update vfs documentation.

Link: http://lkml.kernel.org/p/e37e6e7b76acbdcc3bb4ab2a57c8f8ca1ae11b9a.1412031505.git.joe@perches.com

Cc: David S. Miller <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
[ did a few clean ups ]
Signed-off-by: Steven Rostedt <[email protected]>
This commit is contained in:
Joe Perches 2014-09-29 16:08:25 -07:00 • committed by Steven Rostedt
commit a3816ab0e8
10 changed files with 63 additions and 83 deletions

View file

@ -870,25 +870,22 @@ static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait)
}
#ifdef CONFIG_PROC_FS
static int ep_show_fdinfo(struct seq_file *m, struct file *f)
static void ep_show_fdinfo(struct seq_file *m, struct file *f)
{
struct eventpoll *ep = f->private_data;
struct rb_node *rbp;
int ret = 0;
mutex_lock(&ep->mtx);
for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) {
struct epitem *epi = rb_entry(rbp, struct epitem, rbn);
ret = seq_printf(m, "tfd: %8d events: %8x data: %16llx\n",
epi->ffd.fd, epi->event.events,
(long long)epi->event.data);
if (ret)
seq_printf(m, "tfd: %8d events: %8x data: %16llx\n",
epi->ffd.fd, epi->event.events,
(long long)epi->event.data);
if (seq_has_overflowed(m))
break;
}
mutex_unlock(&ep->mtx);
return ret;
}
#endif