diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-08-21 08:43:55 +0200 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-09-03 06:37:42 +0200 |
commit | 70045dafdf8d2f4645b68c0922728d719c2f5a9a (patch) | |
tree | 23c0bd4d91b3a2fa1c7ce61e726321642fcd6dbd /fs/xfs | |
parent | xfs: Remove duplicate xfs_trans_priv.h header (diff) | |
download | linux-70045dafdf8d2f4645b68c0922728d719c2f5a9a.tar.xz linux-70045dafdf8d2f4645b68c0922728d719c2f5a9a.zip |
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_mru_cache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c index 7443debaffd6..d0f5b403bdbe 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. */ |