Re: [PATCH 1/5] xfs: take the ilock around xfs_bmapi_read in xfs_zero_remaining_bytes

Christoph Hellwig
2013-12-05T20:40:11Z

On Fri, Dec 06, 2013 at 07:31:15AM +1100, Dave Chinner wrote:
> This now holds the ilock over data IO, which is not allowed to be
> done as data IO completion can require the ilock to be taken. Yes,
> the code specifically avoids all these problems, but the general
> rule is that ilock is only held over metadata IO operations, not
> data IO. If we need data IO serialisation, then we use the iolock.

And we already hold the iolock here. So yeah, we probably should
just move it to protect the xfs_bmapi_read call only.