aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-04 21:27:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:44 -0400
commitd8d3d94b80aa1a1c0ca75c58b8abdc7356f38418 (patch)
tree132f846b04371426b8795475597846aae75e7e07 /fs/fat
parentcb66a7a1f149ff705fa37cad6d1252b046e0ad4f (diff)
pass iov_iter to ->direct_IO()
unmodified, for now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index b3361fe2bcb5..d5237a199055 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -185,8 +185,8 @@ static int fat_write_end(struct file *file, struct address_space *mapping,
185} 185}
186 186
187static ssize_t fat_direct_IO(int rw, struct kiocb *iocb, 187static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
188 const struct iovec *iov, 188 struct iov_iter *iter,
189 loff_t offset, unsigned long nr_segs) 189 loff_t offset)
190{ 190{
191 struct file *file = iocb->ki_filp; 191 struct file *file = iocb->ki_filp;
192 struct address_space *mapping = file->f_mapping; 192 struct address_space *mapping = file->f_mapping;
@@ -203,7 +203,7 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
203 * 203 *
204 * Return 0, and fallback to normal buffered write. 204 * Return 0, and fallback to normal buffered write.
205 */ 205 */
206 loff_t size = offset + iov_length(iov, nr_segs); 206 loff_t size = offset + iov_length(iter->iov, iter->nr_segs);
207 if (MSDOS_I(inode)->mmu_private < size) 207 if (MSDOS_I(inode)->mmu_private < size)
208 return 0; 208 return 0;
209 } 209 }
@@ -212,10 +212,11 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
212 * FAT need to use the DIO_LOCKING for avoiding the race 212 * FAT need to use the DIO_LOCKING for avoiding the race
213 * condition of fat_get_block() and ->truncate(). 213 * condition of fat_get_block() and ->truncate().
214 */ 214 */
215 ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, 215 ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset,
216 fat_get_block); 216 iter->nr_segs, fat_get_block);
217 if (ret < 0 && (rw & WRITE)) 217 if (ret < 0 && (rw & WRITE))
218 fat_write_failed(mapping, offset + iov_length(iov, nr_segs)); 218 fat_write_failed(mapping, offset +
219 iov_length(iter->iov, iter->nr_segs));
219 220
220 return ret; 221 return ret;
221} 222}