Message ID | 20200921144353.31319-16-rgoldwyn@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | BTRFS DIO inode locking/D_SYNC fix | expand |
On Mon, Sep 21, 2020 at 09:43:53AM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues <rgoldwyn@suse.com> > > 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()") It turns out gfs2 also calls without the lock, so while I'd love to see the assert come back we'd regress gfs2.
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;