diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e9a3ff8a85fd..ca69e83d4f3c 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -8081,7 +8081,7 @@ free_ordered: | |||
8081 | bio_endio(dio_bio, ret); | 8081 | bio_endio(dio_bio, ret); |
8082 | } | 8082 | } |
8083 | 8083 | ||
8084 | static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *iocb, | 8084 | static ssize_t check_direct_IO(struct btrfs_root *root, struct kiocb *iocb, |
8085 | const struct iov_iter *iter, loff_t offset) | 8085 | const struct iov_iter *iter, loff_t offset) |
8086 | { | 8086 | { |
8087 | int seg; | 8087 | int seg; |
@@ -8096,7 +8096,7 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io | |||
8096 | goto out; | 8096 | goto out; |
8097 | 8097 | ||
8098 | /* If this is a write we don't need to check anymore */ | 8098 | /* If this is a write we don't need to check anymore */ |
8099 | if (rw & WRITE) | 8099 | if (iov_iter_rw(iter) == WRITE) |
8100 | return 0; | 8100 | return 0; |
8101 | /* | 8101 | /* |
8102 | * Check to make sure we don't have duplicate iov_base's in this | 8102 | * Check to make sure we don't have duplicate iov_base's in this |
@@ -8126,7 +8126,7 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, | |||
8126 | bool relock = false; | 8126 | bool relock = false; |
8127 | ssize_t ret; | 8127 | ssize_t ret; |
8128 | 8128 | ||
8129 | if (check_direct_IO(BTRFS_I(inode)->root, rw, iocb, iter, offset)) | 8129 | if (check_direct_IO(BTRFS_I(inode)->root, iocb, iter, offset)) |
8130 | return 0; | 8130 | return 0; |
8131 | 8131 | ||
8132 | atomic_inc(&inode->i_dio_count); | 8132 | atomic_inc(&inode->i_dio_count); |
@@ -8144,7 +8144,7 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, | |||
8144 | filemap_fdatawrite_range(inode->i_mapping, offset, | 8144 | filemap_fdatawrite_range(inode->i_mapping, offset, |
8145 | offset + count - 1); | 8145 | offset + count - 1); |
8146 | 8146 | ||
8147 | if (rw & WRITE) { | 8147 | if (iov_iter_rw(iter) == WRITE) { |
8148 | /* | 8148 | /* |
8149 | * If the write DIO is beyond the EOF, we need update | 8149 | * If the write DIO is beyond the EOF, we need update |
8150 | * the isize, but it is protected by i_mutex. So we can | 8150 | * the isize, but it is protected by i_mutex. So we can |
@@ -8178,7 +8178,7 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, | |||
8178 | BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev, | 8178 | BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev, |
8179 | iter, offset, btrfs_get_blocks_direct, NULL, | 8179 | iter, offset, btrfs_get_blocks_direct, NULL, |
8180 | btrfs_submit_direct, flags); | 8180 | btrfs_submit_direct, flags); |
8181 | if (rw & WRITE) { | 8181 | if (iov_iter_rw(iter) == WRITE) { |
8182 | current->journal_info = NULL; | 8182 | current->journal_info = NULL; |
8183 | if (ret < 0 && ret != -EIOCBQUEUED) | 8183 | if (ret < 0 && ret != -EIOCBQUEUED) |
8184 | btrfs_delalloc_release_space(inode, count); | 8184 | btrfs_delalloc_release_space(inode, count); |