diff options
author | Joe Perches <joe@perches.com> | 2014-09-29 19:08:25 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-11-05 14:13:23 -0500 |
commit | a3816ab0e8fe542a89a53b82506a8ddac063fbe3 (patch) | |
tree | ffbc4ef9fe5deb6c9af3473055e0854078e1c7aa /fs/eventpoll.c | |
parent | f365ef9b79f01d69a01134b42fdff251a510b022 (diff) |
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 <davem@davemloft.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Joe Perches <joe@perches.com>
[ did a few clean ups ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r-- | fs/eventpoll.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 7bcfff900f05..d77f94491352 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -870,25 +870,22 @@ static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait) | |||
870 | } | 870 | } |
871 | 871 | ||
872 | #ifdef CONFIG_PROC_FS | 872 | #ifdef CONFIG_PROC_FS |
873 | static int ep_show_fdinfo(struct seq_file *m, struct file *f) | 873 | static void ep_show_fdinfo(struct seq_file *m, struct file *f) |
874 | { | 874 | { |
875 | struct eventpoll *ep = f->private_data; | 875 | struct eventpoll *ep = f->private_data; |
876 | struct rb_node *rbp; | 876 | struct rb_node *rbp; |
877 | int ret = 0; | ||
878 | 877 | ||
879 | mutex_lock(&ep->mtx); | 878 | mutex_lock(&ep->mtx); |
880 | for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) { | 879 | for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) { |
881 | struct epitem *epi = rb_entry(rbp, struct epitem, rbn); | 880 | struct epitem *epi = rb_entry(rbp, struct epitem, rbn); |
882 | 881 | ||
883 | ret = seq_printf(m, "tfd: %8d events: %8x data: %16llx\n", | 882 | seq_printf(m, "tfd: %8d events: %8x data: %16llx\n", |
884 | epi->ffd.fd, epi->event.events, | 883 | epi->ffd.fd, epi->event.events, |
885 | (long long)epi->event.data); | 884 | (long long)epi->event.data); |
886 | if (ret) | 885 | if (seq_has_overflowed(m)) |
887 | break; | 886 | break; |
888 | } | 887 | } |
889 | mutex_unlock(&ep->mtx); | 888 | mutex_unlock(&ep->mtx); |
890 | |||
891 | return ret; | ||
892 | } | 889 | } |
893 | #endif | 890 | #endif |
894 | 891 | ||