diff options
-rw-r--r-- | drivers/base/memory.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 2 | ||||
-rw-r--r-- | include/uapi/linux/cm4000_cs.h | 1 | ||||
-rw-r--r-- | ipc/msg.c | 5 | ||||
-rw-r--r-- | kernel/time/timer_list.c | 41 | ||||
-rw-r--r-- | mm/slab.h | 2 |
6 files changed, 33 insertions, 20 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 2b7813ec6d02..ec386ee9cb22 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -141,6 +141,8 @@ static ssize_t show_mem_removable(struct device *dev, | |||
141 | container_of(dev, struct memory_block, dev); | 141 | container_of(dev, struct memory_block, dev); |
142 | 142 | ||
143 | for (i = 0; i < sections_per_block; i++) { | 143 | for (i = 0; i < sections_per_block; i++) { |
144 | if (!present_section_nr(mem->start_section_nr + i)) | ||
145 | continue; | ||
144 | pfn = section_nr_to_pfn(mem->start_section_nr + i); | 146 | pfn = section_nr_to_pfn(mem->start_section_nr + i); |
145 | ret &= is_mem_section_removable(pfn, PAGES_PER_SECTION); | 147 | ret &= is_mem_section_removable(pfn, PAGES_PER_SECTION); |
146 | } | 148 | } |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 854d80955bf8..121da2dc3be8 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1022,7 +1022,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | |||
1022 | struct inode *inode = NULL; | 1022 | struct inode *inode = NULL; |
1023 | struct ocfs2_super *osb = NULL; | 1023 | struct ocfs2_super *osb = NULL; |
1024 | struct buffer_head *bh = NULL; | 1024 | struct buffer_head *bh = NULL; |
1025 | char nodestr[8]; | 1025 | char nodestr[12]; |
1026 | struct ocfs2_blockcheck_stats stats; | 1026 | struct ocfs2_blockcheck_stats stats; |
1027 | 1027 | ||
1028 | trace_ocfs2_fill_super(sb, data, silent); | 1028 | trace_ocfs2_fill_super(sb, data, silent); |
diff --git a/include/uapi/linux/cm4000_cs.h b/include/uapi/linux/cm4000_cs.h index bc51f77db918..1217f751a1bc 100644 --- a/include/uapi/linux/cm4000_cs.h +++ b/include/uapi/linux/cm4000_cs.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _UAPI_CM4000_H_ | 2 | #define _UAPI_CM4000_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/ioctl.h> | ||
5 | 6 | ||
6 | #define MAX_ATR 33 | 7 | #define MAX_ATR 33 |
7 | 8 | ||
@@ -839,7 +839,7 @@ static inline void free_copy(struct msg_msg *copy) | |||
839 | 839 | ||
840 | static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) | 840 | static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) |
841 | { | 841 | { |
842 | struct msg_msg *msg; | 842 | struct msg_msg *msg, *found = NULL; |
843 | long count = 0; | 843 | long count = 0; |
844 | 844 | ||
845 | list_for_each_entry(msg, &msq->q_messages, m_list) { | 845 | list_for_each_entry(msg, &msq->q_messages, m_list) { |
@@ -848,6 +848,7 @@ static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) | |||
848 | *msgtyp, mode)) { | 848 | *msgtyp, mode)) { |
849 | if (mode == SEARCH_LESSEQUAL && msg->m_type != 1) { | 849 | if (mode == SEARCH_LESSEQUAL && msg->m_type != 1) { |
850 | *msgtyp = msg->m_type - 1; | 850 | *msgtyp = msg->m_type - 1; |
851 | found = msg; | ||
851 | } else if (mode == SEARCH_NUMBER) { | 852 | } else if (mode == SEARCH_NUMBER) { |
852 | if (*msgtyp == count) | 853 | if (*msgtyp == count) |
853 | return msg; | 854 | return msg; |
@@ -857,7 +858,7 @@ static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) | |||
857 | } | 858 | } |
858 | } | 859 | } |
859 | 860 | ||
860 | return ERR_PTR(-EAGAIN); | 861 | return found ?: ERR_PTR(-EAGAIN); |
861 | } | 862 | } |
862 | 863 | ||
863 | long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgflg, | 864 | long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgflg, |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 3bdf28323012..61ed862cdd37 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -265,10 +265,9 @@ static inline void timer_list_header(struct seq_file *m, u64 now) | |||
265 | static int timer_list_show(struct seq_file *m, void *v) | 265 | static int timer_list_show(struct seq_file *m, void *v) |
266 | { | 266 | { |
267 | struct timer_list_iter *iter = v; | 267 | struct timer_list_iter *iter = v; |
268 | u64 now = ktime_to_ns(ktime_get()); | ||
269 | 268 | ||
270 | if (iter->cpu == -1 && !iter->second_pass) | 269 | if (iter->cpu == -1 && !iter->second_pass) |
271 | timer_list_header(m, now); | 270 | timer_list_header(m, iter->now); |
272 | else if (!iter->second_pass) | 271 | else if (!iter->second_pass) |
273 | print_cpu(m, iter->cpu, iter->now); | 272 | print_cpu(m, iter->cpu, iter->now); |
274 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 273 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
@@ -298,33 +297,41 @@ void sysrq_timer_list_show(void) | |||
298 | return; | 297 | return; |
299 | } | 298 | } |
300 | 299 | ||
301 | static void *timer_list_start(struct seq_file *file, loff_t *offset) | 300 | static void *move_iter(struct timer_list_iter *iter, loff_t offset) |
302 | { | 301 | { |
303 | struct timer_list_iter *iter = file->private; | 302 | for (; offset; offset--) { |
304 | 303 | iter->cpu = cpumask_next(iter->cpu, cpu_online_mask); | |
305 | if (!*offset) { | 304 | if (iter->cpu >= nr_cpu_ids) { |
306 | iter->cpu = -1; | ||
307 | iter->now = ktime_to_ns(ktime_get()); | ||
308 | } else if (iter->cpu >= nr_cpu_ids) { | ||
309 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 305 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
310 | if (!iter->second_pass) { | 306 | if (!iter->second_pass) { |
311 | iter->cpu = -1; | 307 | iter->cpu = -1; |
312 | iter->second_pass = true; | 308 | iter->second_pass = true; |
313 | } else | 309 | } else |
314 | return NULL; | 310 | return NULL; |
315 | #else | 311 | #else |
316 | return NULL; | 312 | return NULL; |
317 | #endif | 313 | #endif |
314 | } | ||
318 | } | 315 | } |
319 | return iter; | 316 | return iter; |
320 | } | 317 | } |
321 | 318 | ||
319 | static void *timer_list_start(struct seq_file *file, loff_t *offset) | ||
320 | { | ||
321 | struct timer_list_iter *iter = file->private; | ||
322 | |||
323 | if (!*offset) | ||
324 | iter->now = ktime_to_ns(ktime_get()); | ||
325 | iter->cpu = -1; | ||
326 | iter->second_pass = false; | ||
327 | return move_iter(iter, *offset); | ||
328 | } | ||
329 | |||
322 | static void *timer_list_next(struct seq_file *file, void *v, loff_t *offset) | 330 | static void *timer_list_next(struct seq_file *file, void *v, loff_t *offset) |
323 | { | 331 | { |
324 | struct timer_list_iter *iter = file->private; | 332 | struct timer_list_iter *iter = file->private; |
325 | iter->cpu = cpumask_next(iter->cpu, cpu_online_mask); | ||
326 | ++*offset; | 333 | ++*offset; |
327 | return timer_list_start(file, offset); | 334 | return move_iter(iter, 1); |
328 | } | 335 | } |
329 | 336 | ||
330 | static void timer_list_stop(struct seq_file *seq, void *v) | 337 | static void timer_list_stop(struct seq_file *seq, void *v) |
@@ -162,6 +162,8 @@ static inline const char *cache_name(struct kmem_cache *s) | |||
162 | 162 | ||
163 | static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) | 163 | static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) |
164 | { | 164 | { |
165 | if (!s->memcg_params) | ||
166 | return NULL; | ||
165 | return s->memcg_params->memcg_caches[idx]; | 167 | return s->memcg_params->memcg_caches[idx]; |
166 | } | 168 | } |
167 | 169 | ||