From: Jiaying Zhang Date: Tue, 2 Mar 2010 18:26:36 +0000 (-0500) Subject: ext4: Use direct_IO_no_locking in ext4 dio read X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b7adc1f363e72e9131a582cc2cb00eaf83f51a39;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ext4: Use direct_IO_no_locking in ext4 dio read Signed-off-by: Jiaying Zhang Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d291310aef6b..92214d4e5afa 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3474,7 +3474,14 @@ static ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb, } retry: - ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, + if (rw == READ && ext4_should_dioread_nolock(inode)) + ret = blockdev_direct_IO_no_locking(rw, iocb, inode, + inode->i_sb->s_bdev, iov, + offset, nr_segs, + ext4_get_block, NULL); + else + ret = blockdev_direct_IO(rw, iocb, inode, + inode->i_sb->s_bdev, iov, offset, nr_segs, ext4_get_block, NULL); if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))