aboutsummaryrefslogtreecommitdiffstats
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 e85664b7c7d9..19f532e7d35e 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -72,9 +72,10 @@ int seq_open(struct file *file, const struct seq_operations *op)
72 72
73 mutex_init(&p->lock); 73 mutex_init(&p->lock);
74 p->op = op; 74 p->op = op;
75#ifdef CONFIG_USER_NS 75
76 p->user_ns = file->f_cred->user_ns; 76 // No refcounting: the lifetime of 'p' is constrained
77#endif 77 // to the lifetime of the file.
78 p->file = file;
78 79
79 /* 80 /*
80 * Wrappers around seq_open(e.g. swaps_open) need to be 81 * Wrappers around seq_open(e.g. swaps_open) need to be