mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
xfs: use LIST_HEAD() to simplify code
list_head can be initialized automatically with LIST_HEAD() instead of calling INIT_LIST_HEAD(). Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
This commit is contained in:
parent
9db384feea
commit
70045dafdf
@ -230,9 +230,8 @@ _xfs_mru_cache_clear_reap_list(
|
||||
__releases(mru->lock) __acquires(mru->lock)
|
||||
{
|
||||
struct xfs_mru_cache_elem *elem, *next;
|
||||
struct list_head tmp;
|
||||
LIST_HEAD(tmp);
|
||||
|
||||
INIT_LIST_HEAD(&tmp);
|
||||
list_for_each_entry_safe(elem, next, &mru->reap_list, list_node) {
|
||||
|
||||
/* Remove the element from the data store. */
|
||||
|
Loading…
Reference in New Issue
Block a user