From: Dave Chinner Date: Tue, 27 Jul 2021 23:23:46 +0000 (-0700) Subject: xfs: flush data dev on external log write X-Git-Tag: v5.15~628^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1e27239b9169f07edba0ca0e52805645a1768ba;p=platform%2Fkernel%2Flinux-starfive.git xfs: flush data dev on external log write We incorrectly flush the log device instead of the data device when trying to ensure metadata is correctly on disk before writing the unmount record. Fixes: eef983ffeae7 ("xfs: journal IO cache flush reductions") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 36fa265..96434cc 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -833,7 +833,7 @@ xlog_write_unmount_record( * stamp the tail LSN into the unmount record. */ if (log->l_targ != log->l_mp->m_ddev_targp) - blkdev_issue_flush(log->l_targ->bt_bdev); + blkdev_issue_flush(log->l_mp->m_ddev_targp->bt_bdev); return xlog_write(log, &vec, ticket, NULL, NULL, XLOG_UNMOUNT_TRANS); }