summaryrefslogtreecommitdiff
path: root/urcu-list-compat.h
blob: 44117adc7add0a1dd3467168f7c7818c0d64ccf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef URCU_LIST_COMPAT_H
#define URCU_LIST_COMPAT_H

#include <urcu/list.h>

#ifndef cds_list_last_entry
#define cds_list_last_entry(ptr, type, member) \
	cds_list_entry((ptr)->prev, type, member)
#endif

#ifndef cds_list_next_entry
#define cds_list_next_entry(pos, member) \
	cds_list_entry((pos)->member.next, typeof(*(pos)), member)
#endif

#ifndef cds_list_prev_entry
#define cds_list_prev_entry(pos, member) \
	cds_list_entry((pos)->member.prev, typeof(*(pos)), member)
#endif

#endif /* URCU_LIST_COMPAT_H */
ed6ddabfcd77e72d7cdfa45d parent3cd886666ff19e9796a519e16d94fc94f79c8a4c (diff)
fs: proc: Delete inode time initializations in proc_alloc_inode()
proc uses new_inode_pseudo() to allocate a new inode. This in turn calls the proc_inode_alloc() callback. But, at this point, inode is still not initialized with the super_block pointer which only happens just before alloc_inode() returns after the call to inode_init_always(). Also, the inode times are initialized again after the call to new_inode_pseudo() in proc_inode_alloc(). The assignemet in proc_alloc_inode() is redundant and also doesn't work after the current_time() api is changed to take struct inode* instead of struct *super_block. This bug was reported after current_time() was used to assign times in proc_alloc_inode(). Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> [0-day test robot] Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat