diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
| commit | 53279f36dccffc26ff536003fd6bb97cc21c3b82 (patch) | |
| tree | 9d16e497c0e4158c7c054c479bd0e9ff0388d7bb /include/linux/seq_file.h | |
| parent | a6e8c0a25377e27958b11b20e1927885ae7c9857 (diff) | |
| parent | 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff) | |
Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changes
Diffstat (limited to 'include/linux/seq_file.h')
| -rw-r--r-- | include/linux/seq_file.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 83c44eefe698..68a04a343cad 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -13,6 +13,7 @@ struct file; | |||
| 13 | struct path; | 13 | struct path; |
| 14 | struct inode; | 14 | struct inode; |
| 15 | struct dentry; | 15 | struct dentry; |
| 16 | struct user_namespace; | ||
| 16 | 17 | ||
| 17 | struct seq_file { | 18 | struct seq_file { |
| 18 | char *buf; | 19 | char *buf; |
| @@ -25,6 +26,9 @@ struct seq_file { | |||
| 25 | struct mutex lock; | 26 | struct mutex lock; |
| 26 | const struct seq_operations *op; | 27 | const struct seq_operations *op; |
| 27 | int poll_event; | 28 | int poll_event; |
| 29 | #ifdef CONFIG_USER_NS | ||
| 30 | struct user_namespace *user_ns; | ||
| 31 | #endif | ||
| 28 | void *private; | 32 | void *private; |
| 29 | }; | 33 | }; |
| 30 | 34 | ||
| @@ -128,6 +132,16 @@ int seq_put_decimal_ull(struct seq_file *m, char delimiter, | |||
| 128 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, | 132 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, |
| 129 | long long num); | 133 | long long num); |
| 130 | 134 | ||
| 135 | static inline struct user_namespace *seq_user_ns(struct seq_file *seq) | ||
| 136 | { | ||
| 137 | #ifdef CONFIG_USER_NS | ||
| 138 | return seq->user_ns; | ||
| 139 | #else | ||
| 140 | extern struct user_namespace init_user_ns; | ||
| 141 | return &init_user_ns; | ||
| 142 | #endif | ||
| 143 | } | ||
| 144 | |||
| 131 | #define SEQ_START_TOKEN ((void *)1) | 145 | #define SEQ_START_TOKEN ((void *)1) |
| 132 | /* | 146 | /* |
| 133 | * Helpers for iteration over list_head-s in seq_files | 147 | * Helpers for iteration over list_head-s in seq_files |
