@@ -16,17 +16,17 @@
/* return the next shared peer mount of @p */
static inline struct mount *next_peer(struct mount *p)
{
- return list_entry(p->mnt_share.next, struct mount, mnt_share);
+ return list_next_entry(p, mnt_share);
}
static inline struct mount *first_slave(struct mount *p)
{
- return list_entry(p->mnt_slave_list.next, struct mount, mnt_slave);
+ return list_first_entry(&p->mnt_slave_list, struct mount, mnt_slave);
}
static inline struct mount *next_slave(struct mount *p)
{
- return list_entry(p->mnt_slave.next, struct mount, mnt_slave);
+ return list_next_entry(p, mnt_slave);
}
static struct mount *get_peer_under_root(struct mount *mnt,
To make the intention clearer, use list_{first,next}_entry instead of list_entry. Signed-off-by: Geliang Tang <geliangtang@163.com> --- fs/pnode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)