Re: [PATCH 22/24] xfs: rework xfs_iflush_cluster() dirty inode iteration

Christoph Hellwig
2020-05-23T11:39:03Z

On Fri, May 22, 2020 at 01:50:27PM +1000, Dave Chinner wrote:
> + if (XFS_FORCED_SHUTDOWN(mp)) {
> + xfs_iunpin_wait(ip);
> + /* xfs_iflush_abort() drops the flush lock */
> + xfs_iflush_abort(ip);
> + xfs_iunlock(ip, XFS_ILOCK_SHARED);
> + error = EIO;
> continue;
> }

This looks suspicious. For one it assigns a postitive errno value to
error. But also it continues into the next iteration, which will then
usually overwrite error again, unless this was the last inode to be
written.