Sorry, I have been distracted away from this regression. This was previously
titled "xfs: synchronously write the superblock on unmount".
xfs_wait_buftarg() does not wait for the completion of the write of the
uncached superblock. This write can race with the shutdown of the log and
causes a panic if the write does not win the race.
The log write of the superblock is important for possible recovery, but a
second syncronous write of the same superblock seems redundant. Would just
waiting for the iodone() of the log write before tearing down the log be
Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
fs/xfs/xfs_mount.c | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -1457,6 +1457,7 @@ void
struct xfs_mount *mp)
+ struct xfs_buf *bp = mp->m_sb_bp;
@@ -1529,6 +1530,13 @@ xfs_unmountfs(
+ * Wait for the superblock to be written out. The superblock buffer
+ * will remain locked until the iodone().