On Wed, Dec 11, 2019 at 06:30:39PM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> > > 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. How is that safe? > + lockdep_assert_held(&file_inode(file)->i_rwsem); Having the asserts in the callers is pointless. The assert is inside the iomap helper to ensure the expected calling conventions, as the code is written under the assumption that we have i_rwsem.