Skip to content

Commit 70045da

Browse files
Hongbo LiChandan Babu R
authored andcommitted
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>
1 parent 9db384f commit 70045da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/xfs/xfs_mru_cache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ _xfs_mru_cache_clear_reap_list(
230230
__releases(mru->lock) __acquires(mru->lock)
231231
{
232232
struct xfs_mru_cache_elem *elem, *next;
233-
struct list_head tmp;
233+
LIST_HEAD(tmp);
234234

235-
INIT_LIST_HEAD(&tmp);
236235
list_for_each_entry_safe(elem, next, &mru->reap_list, list_node) {
237236

238237
/* Remove the element from the data store. */

0 commit comments

Comments
 (0)