Signed-off-by: Cyrill Gorcunov <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Andrey Vagin <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: "Aneesh Kumar K.V" <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Matthew Helsley <[email protected]>
Cc: "J. Bruce Fields" <[email protected]>
Cc: "Aneesh Kumar K.V" <[email protected]>
Cc: Andrew Morton <[email protected]>
---
 fs/eventfd.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

Index: linux-2.6.git/fs/eventfd.c
===================================================================
--- linux-2.6.git.orig/fs/eventfd.c
+++ linux-2.6.git/fs/eventfd.c
@@ -287,23 +287,28 @@ static ssize_t eventfd_write(struct file
 }
 
 #ifdef CONFIG_PROC_FS
-static int eventfd_show_fdinfo(struct seq_file *m, struct file *f)
+static int seq_show(struct seq_file *m, void *v)
 {
-       struct eventfd_ctx *ctx = f->private_data;
-       int ret;
+       struct eventfd_ctx *ctx = ((struct file *)m->private)->private_data;
 
        spin_lock_irq(&ctx->wqh.lock);
-       ret = seq_printf(m, "eventfd-count: %16llx\n",
-                        (unsigned long long)ctx->count);
+       seq_printf(m, "eventfd-count: %16llx\n", (unsigned long 
long)ctx->count);
        spin_unlock_irq(&ctx->wqh.lock);
 
-       return ret;
+       return 0;
 }
+
+static struct seq_operations eventfd_fdinfo_op = {
+       .start          = single_start,
+       .next           = single_next,
+       .stop           = single_stop,
+       .show           = seq_show,
+};
 #endif
 
 static const struct file_operations eventfd_fops = {
 #ifdef CONFIG_PROC_FS
-       .show_fdinfo    = eventfd_show_fdinfo,
+       .fdinfo_op      = &eventfd_fdinfo_op,
 #endif
        .release        = eventfd_release,
        .poll           = eventfd_poll,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to