From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> btrfs holds inode_lock_shared() while performing DIO within EOF, so lockdep_assert_held() check can be re-instated. Revert 3ad99bec6e82 ("iomap: remove lockdep_assert_held()") Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> --- fs/iomap/direct-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index e01f81e7b76f..b5e030971001 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -421,6 +421,8 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, struct blk_plug plug; struct iomap_dio *dio; + lockdep_assert_held(&inode->i_rwsem); + if (!count) return NULL; -- 2.26.2