[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EC24EEC.4000708@parallels.com>
Date: Tue, 15 Nov 2011 15:37:16 +0400
From: Pavel Emelyanov <xemul@...allels.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
CC: Cyrill Gorcunov <gorcunov@...nvz.org>,
Glauber Costa <glommer@...allels.com>,
Andi Kleen <andi@...stfloor.org>, Tejun Heo <tj@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Matt Helsley <matthltc@...ibm.com>
Subject: [PATCH 3/4] proc: Show open file ID in /proc/pid/fdinfo/*
Signed-off-by: Pavel Emelyanov <xemul@...allels.com>
---
fs/proc/base.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 5eb0206..7a9e36b 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -83,6 +83,7 @@
#include <linux/pid_namespace.h>
#include <linux/fs_struct.h>
#include <linux/slab.h>
+#include <linux/gen_object_ids.h>
#ifdef CONFIG_HARDWALL
#include <asm/hardwall.h>
#endif
@@ -1934,9 +1935,10 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
if (info)
snprintf(info, PROC_FDINFO_MAX,
"pos:\t%lli\n"
- "flags:\t0%o\n",
+ "flags:\t0%o\n"
+ "id:\t%lu\n",
(long long) file->f_pos,
- f_flags);
+ f_flags, gen_object_id(file));
spin_unlock(&files->file_lock);
put_files_struct(files);
return 0;
--
1.5.5.6
--
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