X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fseq_file.c;h=19f532e7d35e9a501256ab64f76a645bf7d6b2e6;hb=8329e818f14926a6040df86b2668568bde342ebf;hp=e85664b7c7d963522fd7efc938a3d96a27edc651;hpb=6e37592900f1e75c2031ec10886f4858a260aeec;p=karo-tx-linux.git 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) 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