nilfs2: use list_first_entry
This uses list_first_entry macro instead of list_entry if it's used to get the first entry. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
@@ -957,8 +957,8 @@ static int nilfs_segctor_apply_buffers(struct nilfs_sc_info *sci,
|
||||
|
||||
dispose_buffers:
|
||||
while (!list_empty(listp)) {
|
||||
bh = list_entry(listp->next, struct buffer_head,
|
||||
b_assoc_buffers);
|
||||
bh = list_first_entry(listp, struct buffer_head,
|
||||
b_assoc_buffers);
|
||||
list_del_init(&bh->b_assoc_buffers);
|
||||
brelse(bh);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user