diff options
author | Jiaying Zhang <jiayingz@google.com> | 2010-03-02 19:26:36 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-03-02 19:26:36 +0100 |
commit | b7adc1f363e72e9131a582cc2cb00eaf83f51a39 (patch) | |
tree | 9316acb7855ef64f051b4ee4c01f431c15cb4c1e /fs/ext4 | |
parent | ext4: use ext4_get_block_write in buffer write (diff) | |
download | linux-b7adc1f363e72e9131a582cc2cb00eaf83f51a39.tar.xz linux-b7adc1f363e72e9131a582cc2cb00eaf83f51a39.zip |
ext4: Use direct_IO_no_locking in ext4 dio read
Signed-off-by: Jiaying Zhang <jiayingz@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 9 |
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, } 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)) |