Message ID | 20210616163212.1480297-3-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/8] xfs: change the type of ic_datap | expand |
On Wed, Jun 16, 2021 at 06:32:06PM +0200, Christoph Hellwig wrote: > list_add does not require the added element to be initialized. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > 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 >
On 16 Jun 2021 at 22:02, Christoph Hellwig wrote: > list_add does not require the added element to be initialized. > Looks good. Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > 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))
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))
list_add does not require the added element to be initialized. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/xfs/xfs_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)