|
@@ -7,13 +7,10 @@
|
|
#include <linux/mutex.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/cpumask.h>
|
|
#include <linux/cpumask.h>
|
|
#include <linux/nodemask.h>
|
|
#include <linux/nodemask.h>
|
|
|
|
+#include <linux/fs.h>
|
|
|
|
+#include <linux/cred.h>
|
|
|
|
|
|
struct seq_operations;
|
|
struct seq_operations;
|
|
-struct file;
|
|
|
|
-struct path;
|
|
|
|
-struct inode;
|
|
|
|
-struct dentry;
|
|
|
|
-struct user_namespace;
|
|
|
|
|
|
|
|
struct seq_file {
|
|
struct seq_file {
|
|
char *buf;
|
|
char *buf;
|
|
@@ -27,9 +24,7 @@ struct seq_file {
|
|
struct mutex lock;
|
|
struct mutex lock;
|
|
const struct seq_operations *op;
|
|
const struct seq_operations *op;
|
|
int poll_event;
|
|
int poll_event;
|
|
-#ifdef CONFIG_USER_NS
|
|
|
|
- struct user_namespace *user_ns;
|
|
|
|
-#endif
|
|
|
|
|
|
+ const struct file *file;
|
|
void *private;
|
|
void *private;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -147,7 +142,7 @@ int seq_release_private(struct inode *, struct file *);
|
|
static inline struct user_namespace *seq_user_ns(struct seq_file *seq)
|
|
static inline struct user_namespace *seq_user_ns(struct seq_file *seq)
|
|
{
|
|
{
|
|
#ifdef CONFIG_USER_NS
|
|
#ifdef CONFIG_USER_NS
|
|
- return seq->user_ns;
|
|
|
|
|
|
+ return seq->file->f_cred->user_ns;
|
|
#else
|
|
#else
|
|
extern struct user_namespace init_user_ns;
|
|
extern struct user_namespace init_user_ns;
|
|
return &init_user_ns;
|
|
return &init_user_ns;
|