diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-07-27 16:23:46 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-07-29 09:27:27 -0700 |
commit | b1e27239b9169f07edba0ca0e52805645a1768ba (patch) | |
tree | 33fdec846f13bd42f7f79d1d57182306d9698a8c | |
parent | b102a46ce16fd5550aed882c3c5b95f50da7992c (diff) | |
download | linux-b1e27239b9169f07edba0ca0e52805645a1768ba.tar.gz linux-b1e27239b9169f07edba0ca0e52805645a1768ba.tar.bz2 linux-b1e27239b9169f07edba0ca0e52805645a1768ba.zip |
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 <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r-- | fs/xfs/xfs_log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 36fa2650b081..96434cc4df6e 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); } |