list_add does not require the added element to be initialized. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- fs/xfs/xfs_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 8999c78f3ac6d9..32cb0fc459a364 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -851,7 +851,7 @@ xlog_write_unmount_record( .lv_iovecp = ®, }; LIST_HEAD(lv_chain); - INIT_LIST_HEAD(&vec.lv_list); + list_add(&vec.lv_list, &lv_chain); BUILD_BUG_ON((sizeof(struct xlog_op_header) + @@ -1587,7 +1587,7 @@ xlog_commit_record( }; int error; LIST_HEAD(lv_chain); - INIT_LIST_HEAD(&vec.lv_list); + list_add(&vec.lv_list, &lv_chain); if (XLOG_FORCED_SHUTDOWN(log)) -- 2.30.2