From: Hongbo Li Date: Wed, 21 Aug 2024 06:43:55 +0000 (+0800) Subject: xfs: use LIST_HEAD() to simplify code X-Git-Tag: v6.12-rc1~138^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70045dafdf8d2f4645b68c0922728d719c2f5a9a;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R --- diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c index 7443debaffd65..d0f5b403bdbeb 100644 --- a/fs/xfs/xfs_mru_cache.c +++ b/fs/xfs/xfs_mru_cache.c @@ -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. */