xfs: shut up -Wuninitialized in xfsaild_push
JIRA: https://issues.redhat.com/browse/RHEL-2002 commit e5827a007aa4bb737c63121fd2c77e089b18a372 Author: Darrick J. Wong <djwong@kernel.org> Date: Mon Nov 28 17:24:42 2022 -0800 xfs: shut up -Wuninitialized in xfsaild_push -Wuninitialized complains about @target in xfsaild_push being uninitialized in the case where the waitqueue is active but there is no last item in the AIL to wait for. I /think/ it should never be the case that the subsequent xfs_trans_ail_cursor_first returns a log item and hence we'll never end up at XFS_LSN_CMP, but let's make this explicit. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>
This commit is contained in:
parent
b44fafc03f
commit
5dce1dedb8
|
@ -422,7 +422,7 @@ xfsaild_push(
|
|||
struct xfs_ail_cursor cur;
|
||||
struct xfs_log_item *lip;
|
||||
xfs_lsn_t lsn;
|
||||
xfs_lsn_t target;
|
||||
xfs_lsn_t target = NULLCOMMITLSN;
|
||||
long tout;
|
||||
int stuck = 0;
|
||||
int flushing = 0;
|
||||
|
@ -472,6 +472,8 @@ xfsaild_push(
|
|||
|
||||
XFS_STATS_INC(mp, xs_push_ail);
|
||||
|
||||
ASSERT(target != NULLCOMMITLSN);
|
||||
|
||||
lsn = lip->li_lsn;
|
||||
while ((XFS_LSN_CMP(lip->li_lsn, target) <= 0)) {
|
||||
int lock_result;
|
||||
|
|
Loading…
Reference in New Issue