[Devel] [PATCH rh7] ms/epoll: Make fdinfo to always success
Cyrill Gorcunov
gorcunov at odin.com
Wed Nov 18 05:15:26 PST 2015
It is a diet backport of vanilla's
ML: a3816ab0e8fe542a89a53b82506a8ddac063fbe3
which allows to disaply a large numbers of inotify assigned.
Otherwise only ones fit to 4K buffer would be shown.
Reported-by: Pavel Emelyanov <xemul at parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
CC: Konstantin Khorenko <khorenko at virtuozzo.com>
---
fs/eventpoll.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
Index: linux-pcs7.git/fs/eventpoll.c
===================================================================
--- linux-pcs7.git.orig/fs/eventpoll.c
+++ linux-pcs7.git/fs/eventpoll.c
@@ -874,21 +874,19 @@ static int ep_show_fdinfo(struct seq_fil
{
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 (m->count == m->size)
break;
}
mutex_unlock(&ep->mtx);
-
- return ret;
+ return 0;
}
#endif
More information about the Devel
mailing list