]> www.infradead.org Git - users/hch/xfs.git/commitdiff
iomap: remove the inode_dio_begin/end calls i_rwsem-non_owner
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Dec 2019 11:53:17 +0000 (12:53 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 17 Feb 2020 21:41:43 +0000 (13:41 -0800)
Now that all iomap users hold i_rwsem over asynchronous I/O
operations these calls can be removed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/iomap/direct-io.c

index 0113ac33b0a0c45e760d9426a9362b3bf57bb76d..c90ec82e8e086d5ad989f648e255f117518cea24 100644 (file)
@@ -126,7 +126,6 @@ static ssize_t iomap_dio_complete(struct iomap_dio *dio, bool unlock)
        if (ret > 0 && (dio->flags & IOMAP_DIO_NEED_SYNC))
                ret = generic_write_sync(iocb, ret);
 
-       inode_dio_end(file_inode(iocb->ki_filp));
        kfree(dio);
 
        return ret;
@@ -513,8 +512,6 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
                        goto out_free_dio;
        }
 
-       inode_dio_begin(inode);
-
        blk_start_plug(&plug);
        do {
                ret = iomap_apply(inode, pos, count, flags, ops, dio,