aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/inode.c9
1 files changed, 8 insertions, 1 deletions
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,
3474 } 3474 }
3475 3475
3476retry: 3476retry:
3477 ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 3477 if (rw == READ && ext4_should_dioread_nolock(inode))
3478 ret = blockdev_direct_IO_no_locking(rw, iocb, inode,
3479 inode->i_sb->s_bdev, iov,
3480 offset, nr_segs,
3481 ext4_get_block, NULL);
3482 else
3483 ret = blockdev_direct_IO(rw, iocb, inode,
3484 inode->i_sb->s_bdev, iov,
3478 offset, nr_segs, 3485 offset, nr_segs,
3479 ext4_get_block, NULL); 3486 ext4_get_block, NULL);
3480 if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries)) 3487 if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))