aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-12 13:30:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-12 13:30:18 -0400
commit16b9057804c02e2d351e9c8f606e909b43cbd9e7 (patch)
treea3ac6e1d9d57a8abf4267e5ead3f2de1309335eb /fs/jfs
parent5c02c392cd2320e8d612376d6b72b6548a680923 (diff)
parentc2338f2dc7c1e9f6202f370c64ffd7f44f3d4b51 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro: "This the bunch that sat in -next + lock_parent() fix. This is the minimal set; there's more pending stuff. In particular, I really hope to get acct.c fixes merged this cycle - we need that to deal sanely with delayed-mntput stuff. In the next pile, hopefully - that series is fairly short and localized (kernel/acct.c, fs/super.c and fs/namespace.c). In this pile: more iov_iter work. Most of prereqs for ->splice_write with sane locking order are there and Kent's dio rewrite would also fit nicely on top of this pile" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (70 commits) lock_parent: don't step on stale ->d_parent of all-but-freed one kill generic_file_splice_write() ceph: switch to iter_file_splice_write() shmem: switch to iter_file_splice_write() nfs: switch to iter_splice_write_file() fs/splice.c: remove unneeded exports ocfs2: switch to iter_file_splice_write() ->splice_write() via ->write_iter() bio_vec-backed iov_iter optimize copy_page_{to,from}_iter() bury generic_file_aio_{read,write} lustre: get rid of messing with iovecs ceph: switch to ->write_iter() ceph_sync_direct_write: stop poking into iov_iter guts ceph_sync_read: stop poking into iov_iter guts new helper: copy_page_from_iter() fuse: switch to ->write_iter() btrfs: switch to ->write_iter() ocfs2: switch to ->write_iter() xfs: switch to ->write_iter() ...
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/file.c10
-rw-r--r--fs/jfs/inode.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index 794da944d5cd..33aa0cc1f8b8 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -151,13 +151,13 @@ const struct inode_operations jfs_file_inode_operations = {
151const struct file_operations jfs_file_operations = { 151const struct file_operations jfs_file_operations = {
152 .open = jfs_open, 152 .open = jfs_open,
153 .llseek = generic_file_llseek, 153 .llseek = generic_file_llseek,
154 .write = do_sync_write, 154 .write = new_sync_write,
155 .read = do_sync_read, 155 .read = new_sync_read,
156 .aio_read = generic_file_aio_read, 156 .read_iter = generic_file_read_iter,
157 .aio_write = generic_file_aio_write, 157 .write_iter = generic_file_write_iter,
158 .mmap = generic_file_mmap, 158 .mmap = generic_file_mmap,
159 .splice_read = generic_file_splice_read, 159 .splice_read = generic_file_splice_read,
160 .splice_write = generic_file_splice_write, 160 .splice_write = iter_file_splice_write,
161 .fsync = jfs_fsync, 161 .fsync = jfs_fsync,
162 .release = jfs_release, 162 .release = jfs_release,
163 .unlocked_ioctl = jfs_ioctl, 163 .unlocked_ioctl = jfs_ioctl,
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 6f8fe72c2a7a..bd3df1ca3c9b 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -331,15 +331,15 @@ static sector_t jfs_bmap(struct address_space *mapping, sector_t block)
331} 331}
332 332
333static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb, 333static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
334 const struct iovec *iov, loff_t offset, unsigned long nr_segs) 334 struct iov_iter *iter, loff_t offset)
335{ 335{
336 struct file *file = iocb->ki_filp; 336 struct file *file = iocb->ki_filp;
337 struct address_space *mapping = file->f_mapping; 337 struct address_space *mapping = file->f_mapping;
338 struct inode *inode = file->f_mapping->host; 338 struct inode *inode = file->f_mapping->host;
339 size_t count = iov_iter_count(iter);
339 ssize_t ret; 340 ssize_t ret;
340 341
341 ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, 342 ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, jfs_get_block);
342 jfs_get_block);
343 343
344 /* 344 /*
345 * In case of error extending write may have instantiated a few 345 * In case of error extending write may have instantiated a few
@@ -347,7 +347,7 @@ static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
347 */ 347 */
348 if (unlikely((rw & WRITE) && ret < 0)) { 348 if (unlikely((rw & WRITE) && ret < 0)) {
349 loff_t isize = i_size_read(inode); 349 loff_t isize = i_size_read(inode);
350 loff_t end = offset + iov_length(iov, nr_segs); 350 loff_t end = offset + count;
351 351
352 if (end > isize) 352 if (end > isize)
353 jfs_write_failed(mapping, end); 353 jfs_write_failed(mapping, end);