diff options
Diffstat (limited to 'fs/dax.c')
-rw-r--r-- | fs/dax.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -155,7 +155,7 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, | |||
155 | } | 155 | } |
156 | 156 | ||
157 | if (iov_iter_rw(iter) == WRITE) | 157 | if (iov_iter_rw(iter) == WRITE) |
158 | len = copy_from_iter(addr, max - pos, iter); | 158 | len = copy_from_iter_nocache(addr, max - pos, iter); |
159 | else if (!hole) | 159 | else if (!hole) |
160 | len = copy_to_iter(addr, max - pos, iter); | 160 | len = copy_to_iter(addr, max - pos, iter); |
161 | else | 161 | else |
@@ -209,7 +209,8 @@ ssize_t dax_do_io(struct kiocb *iocb, struct inode *inode, | |||
209 | } | 209 | } |
210 | 210 | ||
211 | /* Protects against truncate */ | 211 | /* Protects against truncate */ |
212 | inode_dio_begin(inode); | 212 | if (!(flags & DIO_SKIP_DIO_COUNT)) |
213 | inode_dio_begin(inode); | ||
213 | 214 | ||
214 | retval = dax_io(inode, iter, pos, end, get_block, &bh); | 215 | retval = dax_io(inode, iter, pos, end, get_block, &bh); |
215 | 216 | ||
@@ -219,7 +220,8 @@ ssize_t dax_do_io(struct kiocb *iocb, struct inode *inode, | |||
219 | if ((retval > 0) && end_io) | 220 | if ((retval > 0) && end_io) |
220 | end_io(iocb, pos, retval, bh.b_private); | 221 | end_io(iocb, pos, retval, bh.b_private); |
221 | 222 | ||
222 | inode_dio_end(inode); | 223 | if (!(flags & DIO_SKIP_DIO_COUNT)) |
224 | inode_dio_end(inode); | ||
223 | out: | 225 | out: |
224 | return retval; | 226 | return retval; |
225 | } | 227 | } |