summaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-06-15 10:45:10 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 12:57:17 +0400
commitdb963164873f04d7fbdd418b4d023e2b3dee2945 (patch)
tree6e6d954b5ddc30780ca9a310d1e3d13b8967d1fb /fs/proc/base.c
parent147ce69974cc1b44defa2d3d9c202ee83e2f2f3b (diff)
downloadop-kernel-dev-db963164873f04d7fbdd418b4d023e2b3dee2945.zip
op-kernel-dev-db963164873f04d7fbdd418b4d023e2b3dee2945.tar.gz
proc_pid_readdir(): stop wanking with proc_fill_cache() for /proc/self
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 306419c..40d515d 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2882,21 +2882,21 @@ retry:
int proc_pid_readdir(struct file *file, struct dir_context *ctx)
{
struct tgid_iter iter;
- struct pid_namespace *ns;
+ struct pid_namespace *ns = file->f_dentry->d_sb->s_fs_info;
loff_t pos = ctx->pos;
if (pos >= PID_MAX_LIMIT + TGID_OFFSET)
return 0;
if (pos == TGID_OFFSET - 1) {
- if (!proc_fill_cache(file, ctx, "self", 4, NULL, NULL, NULL))
+ struct inode *inode = ns->proc_self->d_inode;
+ if (!dir_emit(ctx, "self", 4, inode->i_ino, DT_LNK))
return 0;
iter.tgid = 0;
} else {
iter.tgid = pos - TGID_OFFSET;
}
iter.task = NULL;
- ns = file->f_dentry->d_sb->s_fs_info;
for (iter = next_tgid(ns, iter);
iter.task;
iter.tgid += 1, iter = next_tgid(ns, iter)) {
OpenPOWER on IntegriCloud