Re: [PATCH 5/9] xfs: make forced shutdown processing atomic

Christoph Hellwig
2021-07-02T08:24:43Z

> + spin_lock(&mp->m_sb_lock);
> + if (XFS_FORCED_SHUTDOWN(mp)) {
> + spin_unlock(&mp->m_sb_lock);
> return;
> }
> + mp->m_flags |= XFS_MOUNT_FS_SHUTDOWN;
> + if (mp->m_sb_bp)
> + mp->m_sb_bp->b_flags |= XBF_DONE;
> + spin_unlock(&mp->m_sb_lock);

Any particular reason for picking m_sb_lock which so far doesn't
seem to be related to mp->m_flags at all? (On which we probably
have a few other races, most notably remount).

> + if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
> + xfs_stack_trace();

This seems new and unrelated?

> +

Spurious empty line at the end of the function.