summaryrefslogtreecommitdiff
path: root/fs/seq_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/seq_file.c')
-rw-r--r--fs/seq_file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 4408057d1dc8..4dcf9d28f022 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -62,9 +62,10 @@ int seq_open(struct file *file, const struct seq_operations *op)
memset(p, 0, sizeof(*p));
mutex_init(&p->lock);
p->op = op;
-#ifdef CONFIG_USER_NS
- p->user_ns = file->f_cred->user_ns;
-#endif
+
+ // No refcounting: the lifetime of 'p' is constrained
+ // to the lifetime of the file.
+ p->file = file;
/*
* Wrappers around seq_open(e.g. swaps_open) need to be