Re: [PATCH 3/8] iomap: Move lockdep_assert_held() to iomap_dio_rw() calls

Christoph Hellwig
2019-12-21T13:41:21Z

On Fri, Dec 13, 2019 at 01:57:45PM -0600, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> Filesystems such as btrfs can perform direct I/O without holding the
> inode->i_rwsem in some of the cases like writing within i_size.
> So, remove the check for lockdep_assert_held() in iomap_dio_rw()

As said last time: in the callers the assert is completely pointless,
as it is always very close to taking the lock. This was just intended
to deal with callers not adhering to the iomap_dio_rw calling
conventins, and moving the assert to the calllers doesn't help with
that at all.

So if you think you need to remove it do just that and write a changelog
explaining the why much better.