diff options
author | Omar Sandoval <osandov@osandov.com> | 2015-03-16 07:33:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:29:45 -0400 |
commit | 22c6186ecea0be9eff1c399298ad36e94a59995f (patch) | |
tree | fffc295f7423e9c8f08dcb014d2b76ed546eb215 | |
parent | 6f67376318abea58589ebe6d69dffeabb6f6c26a (diff) |
direct_IO: remove rw from a_ops->direct_IO()
Now that no one is using rw, remove it completely.
Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | Documentation/filesystems/Locking | 2 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/rw26.c | 4 | ||||
-rw-r--r-- | fs/9p/vfs_addr.c | 3 | ||||
-rw-r--r-- | fs/affs/file.c | 3 | ||||
-rw-r--r-- | fs/block_dev.c | 3 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 4 | ||||
-rw-r--r-- | fs/ceph/addr.c | 3 | ||||
-rw-r--r-- | fs/cifs/file.c | 3 | ||||
-rw-r--r-- | fs/exofs/inode.c | 4 | ||||
-rw-r--r-- | fs/ext2/inode.c | 3 | ||||
-rw-r--r-- | fs/ext3/inode.c | 4 | ||||
-rw-r--r-- | fs/ext4/inode.c | 4 | ||||
-rw-r--r-- | fs/f2fs/data.c | 4 | ||||
-rw-r--r-- | fs/fat/inode.c | 3 | ||||
-rw-r--r-- | fs/fuse/file.c | 3 | ||||
-rw-r--r-- | fs/gfs2/aops.c | 4 | ||||
-rw-r--r-- | fs/hfs/inode.c | 4 | ||||
-rw-r--r-- | fs/hfsplus/inode.c | 4 | ||||
-rw-r--r-- | fs/jfs/inode.c | 4 | ||||
-rw-r--r-- | fs/nfs/direct.c | 3 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 3 | ||||
-rw-r--r-- | fs/ocfs2/aops.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/inode.c | 4 | ||||
-rw-r--r-- | fs/udf/file.c | 3 | ||||
-rw-r--r-- | fs/udf/inode.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_aops.c | 1 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 2 | ||||
-rw-r--r-- | mm/filemap.c | 4 | ||||
-rw-r--r-- | mm/page_io.c | 4 |
31 files changed, 42 insertions, 59 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index c3cd6279e92e..7cdbca44e343 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -196,7 +196,7 @@ prototypes: | |||
196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
197 | int (*releasepage) (struct page *, int); | 197 | int (*releasepage) (struct page *, int); |
198 | void (*freepage)(struct page *); | 198 | void (*freepage)(struct page *); |
199 | int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); | 199 | int (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset); |
200 | int (*migratepage)(struct address_space *, struct page *, struct page *); | 200 | int (*migratepage)(struct address_space *, struct page *, struct page *); |
201 | int (*launder_page)(struct page *); | 201 | int (*launder_page)(struct page *); |
202 | int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); | 202 | int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long); |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 207cdca68bed..5d833b32bbcd 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -590,7 +590,7 @@ struct address_space_operations { | |||
590 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 590 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
591 | int (*releasepage) (struct page *, int); | 591 | int (*releasepage) (struct page *, int); |
592 | void (*freepage)(struct page *); | 592 | void (*freepage)(struct page *); |
593 | ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); | 593 | ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset); |
594 | /* migrate the contents of a page to the specified target */ | 594 | /* migrate the contents of a page to the specified target */ |
595 | int (*migratepage) (struct page *, struct page *); | 595 | int (*migratepage) (struct page *, struct page *); |
596 | int (*launder_page) (struct page *); | 596 | int (*launder_page) (struct page *); |
diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c index 3aa9de6bcc40..0d7ce6b0e23c 100644 --- a/drivers/staging/lustre/lustre/llite/rw26.c +++ b/drivers/staging/lustre/lustre/llite/rw26.c | |||
@@ -359,8 +359,8 @@ static ssize_t ll_direct_IO_26_seg(const struct lu_env *env, struct cl_io *io, | |||
359 | * up to 22MB for 128kB kmalloc and up to 682MB for 4MB kmalloc. */ | 359 | * up to 22MB for 128kB kmalloc and up to 682MB for 4MB kmalloc. */ |
360 | #define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \ | 360 | #define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \ |
361 | ~(DT_MAX_BRW_SIZE - 1)) | 361 | ~(DT_MAX_BRW_SIZE - 1)) |
362 | static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb, | 362 | static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter, |
363 | struct iov_iter *iter, loff_t file_offset) | 363 | loff_t file_offset) |
364 | { | 364 | { |
365 | struct lu_env *env; | 365 | struct lu_env *env; |
366 | struct cl_io *io; | 366 | struct cl_io *io; |
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c index dd5543b1d183..be35d05a4d0e 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c | |||
@@ -230,7 +230,6 @@ static int v9fs_launder_page(struct page *page) | |||
230 | 230 | ||
231 | /** | 231 | /** |
232 | * v9fs_direct_IO - 9P address space operation for direct I/O | 232 | * v9fs_direct_IO - 9P address space operation for direct I/O |
233 | * @rw: direction (read or write) | ||
234 | * @iocb: target I/O control block | 233 | * @iocb: target I/O control block |
235 | * @iov: array of vectors that define I/O buffer | 234 | * @iov: array of vectors that define I/O buffer |
236 | * @pos: offset in file to begin the operation | 235 | * @pos: offset in file to begin the operation |
@@ -248,7 +247,7 @@ static int v9fs_launder_page(struct page *page) | |||
248 | * | 247 | * |
249 | */ | 248 | */ |
250 | static ssize_t | 249 | static ssize_t |
251 | v9fs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos) | 250 | v9fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t pos) |
252 | { | 251 | { |
253 | struct file *file = iocb->ki_filp; | 252 | struct file *file = iocb->ki_filp; |
254 | ssize_t n; | 253 | ssize_t n; |
diff --git a/fs/affs/file.c b/fs/affs/file.c index 7f05a468d594..dcf27951781c 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c | |||
@@ -389,8 +389,7 @@ static void affs_write_failed(struct address_space *mapping, loff_t to) | |||
389 | } | 389 | } |
390 | 390 | ||
391 | static ssize_t | 391 | static ssize_t |
392 | affs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, | 392 | affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) |
393 | loff_t offset) | ||
394 | { | 393 | { |
395 | struct file *file = iocb->ki_filp; | 394 | struct file *file = iocb->ki_filp; |
396 | struct address_space *mapping = file->f_mapping; | 395 | struct address_space *mapping = file->f_mapping; |
diff --git a/fs/block_dev.c b/fs/block_dev.c index bc23afd35fdb..6e3de63c3055 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -146,8 +146,7 @@ blkdev_get_block(struct inode *inode, sector_t iblock, | |||
146 | } | 146 | } |
147 | 147 | ||
148 | static ssize_t | 148 | static ssize_t |
149 | blkdev_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, | 149 | blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) |
150 | loff_t offset) | ||
151 | { | 150 | { |
152 | struct file *file = iocb->ki_filp; | 151 | struct file *file = iocb->ki_filp; |
153 | struct inode *inode = file->f_mapping->host; | 152 | struct inode *inode = file->f_mapping->host; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ca69e83d4f3c..43192e10cc43 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -8114,8 +8114,8 @@ out: | |||
8114 | return retval; | 8114 | return retval; |
8115 | } | 8115 | } |
8116 | 8116 | ||
8117 | static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, | 8117 | static ssize_t btrfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
8118 | struct iov_iter *iter, loff_t offset) | 8118 | loff_t offset) |
8119 | { | 8119 | { |
8120 | struct file *file = iocb->ki_filp; | 8120 | struct file *file = iocb->ki_filp; |
8121 | struct inode *inode = file->f_mapping->host; | 8121 | struct inode *inode = file->f_mapping->host; |
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index fd5599d32362..155ab9c0246b 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -1198,8 +1198,7 @@ static int ceph_write_end(struct file *file, struct address_space *mapping, | |||
1198 | * intercept O_DIRECT reads and writes early, this function should | 1198 | * intercept O_DIRECT reads and writes early, this function should |
1199 | * never get called. | 1199 | * never get called. |
1200 | */ | 1200 | */ |
1201 | static ssize_t ceph_direct_io(int rw, struct kiocb *iocb, | 1201 | static ssize_t ceph_direct_io(struct kiocb *iocb, struct iov_iter *iter, |
1202 | struct iov_iter *iter, | ||
1203 | loff_t pos) | 1202 | loff_t pos) |
1204 | { | 1203 | { |
1205 | WARN_ON(1); | 1204 | WARN_ON(1); |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ca30c391a894..72394c5abd0f 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -3877,8 +3877,7 @@ void cifs_oplock_break(struct work_struct *work) | |||
3877 | * Direct IO is not yet supported in the cached mode. | 3877 | * Direct IO is not yet supported in the cached mode. |
3878 | */ | 3878 | */ |
3879 | static ssize_t | 3879 | static ssize_t |
3880 | cifs_direct_io(int rw, struct kiocb *iocb, struct iov_iter *iter, | 3880 | cifs_direct_io(struct kiocb *iocb, struct iov_iter *iter, loff_t pos) |
3881 | loff_t pos) | ||
3882 | { | 3881 | { |
3883 | /* | 3882 | /* |
3884 | * FIXME | 3883 | * FIXME |
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index a198e94813fe..35073aaec6e0 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -963,8 +963,8 @@ static void exofs_invalidatepage(struct page *page, unsigned int offset, | |||
963 | 963 | ||
964 | 964 | ||
965 | /* TODO: Should be easy enough to do proprly */ | 965 | /* TODO: Should be easy enough to do proprly */ |
966 | static ssize_t exofs_direct_IO(int rw, struct kiocb *iocb, | 966 | static ssize_t exofs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
967 | struct iov_iter *iter, loff_t offset) | 967 | loff_t offset) |
968 | { | 968 | { |
969 | return 0; | 969 | return 0; |
970 | } | 970 | } |
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 685e514c57dd..e1abf75e994c 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -851,8 +851,7 @@ static sector_t ext2_bmap(struct address_space *mapping, sector_t block) | |||
851 | } | 851 | } |
852 | 852 | ||
853 | static ssize_t | 853 | static ssize_t |
854 | ext2_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, | 854 | ext2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) |
855 | loff_t offset) | ||
856 | { | 855 | { |
857 | struct file *file = iocb->ki_filp; | 856 | struct file *file = iocb->ki_filp; |
858 | struct address_space *mapping = file->f_mapping; | 857 | struct address_space *mapping = file->f_mapping; |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index c70839d26ccd..13c0868c7160 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1820,8 +1820,8 @@ static int ext3_releasepage(struct page *page, gfp_t wait) | |||
1820 | * crashes then stale disk data _may_ be exposed inside the file. But current | 1820 | * crashes then stale disk data _may_ be exposed inside the file. But current |
1821 | * VFS code falls back into buffered path in that case so we are safe. | 1821 | * VFS code falls back into buffered path in that case so we are safe. |
1822 | */ | 1822 | */ |
1823 | static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, | 1823 | static ssize_t ext3_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
1824 | struct iov_iter *iter, loff_t offset) | 1824 | loff_t offset) |
1825 | { | 1825 | { |
1826 | struct file *file = iocb->ki_filp; | 1826 | struct file *file = iocb->ki_filp; |
1827 | struct inode *inode = file->f_mapping->host; | 1827 | struct inode *inode = file->f_mapping->host; |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index cf6ba6536035..42c942a950e1 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3089,8 +3089,8 @@ retake_lock: | |||
3089 | return ret; | 3089 | return ret; |
3090 | } | 3090 | } |
3091 | 3091 | ||
3092 | static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb, | 3092 | static ssize_t ext4_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
3093 | struct iov_iter *iter, loff_t offset) | 3093 | loff_t offset) |
3094 | { | 3094 | { |
3095 | struct file *file = iocb->ki_filp; | 3095 | struct file *file = iocb->ki_filp; |
3096 | struct inode *inode = file->f_mapping->host; | 3096 | struct inode *inode = file->f_mapping->host; |
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index ce25f62edfa7..319eda511c4f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -1135,8 +1135,8 @@ static int check_direct_IO(struct inode *inode, struct iov_iter *iter, | |||
1135 | return 0; | 1135 | return 0; |
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb, | 1138 | static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
1139 | struct iov_iter *iter, loff_t offset) | 1139 | loff_t offset) |
1140 | { | 1140 | { |
1141 | struct file *file = iocb->ki_filp; | 1141 | struct file *file = iocb->ki_filp; |
1142 | struct address_space *mapping = file->f_mapping; | 1142 | struct address_space *mapping = file->f_mapping; |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 342d791b28db..41b729933638 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -245,8 +245,7 @@ static int fat_write_end(struct file *file, struct address_space *mapping, | |||
245 | return err; | 245 | return err; |
246 | } | 246 | } |
247 | 247 | ||
248 | static ssize_t fat_direct_IO(int rw, struct kiocb *iocb, | 248 | static ssize_t fat_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
249 | struct iov_iter *iter, | ||
250 | loff_t offset) | 249 | loff_t offset) |
251 | { | 250 | { |
252 | struct file *file = iocb->ki_filp; | 251 | struct file *file = iocb->ki_filp; |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c1a67da6a8a0..3d355e946991 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -2782,8 +2782,7 @@ static inline loff_t fuse_round_up(loff_t off) | |||
2782 | } | 2782 | } |
2783 | 2783 | ||
2784 | static ssize_t | 2784 | static ssize_t |
2785 | fuse_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, | 2785 | fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) |
2786 | loff_t offset) | ||
2787 | { | 2786 | { |
2788 | DECLARE_COMPLETION_ONSTACK(wait); | 2787 | DECLARE_COMPLETION_ONSTACK(wait); |
2789 | ssize_t ret = 0; | 2788 | ssize_t ret = 0; |
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index e22e6e686a11..20dd33da92de 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
@@ -1038,8 +1038,8 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, loff_t offset) | |||
1038 | 1038 | ||
1039 | 1039 | ||
1040 | 1040 | ||
1041 | static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, | 1041 | static ssize_t gfs2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
1042 | struct iov_iter *iter, loff_t offset) | 1042 | loff_t offset) |
1043 | { | 1043 | { |
1044 | struct file *file = iocb->ki_filp; | 1044 | struct file *file = iocb->ki_filp; |
1045 | struct inode *inode = file->f_mapping->host; | 1045 | struct inode *inode = file->f_mapping->host; |
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 0085d527a55c..75fd5d873c19 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -124,8 +124,8 @@ static int hfs_releasepage(struct page *page, gfp_t mask) | |||
124 | return res ? try_to_free_buffers(page) : 0; | 124 | return res ? try_to_free_buffers(page) : 0; |
125 | } | 125 | } |
126 | 126 | ||
127 | static ssize_t hfs_direct_IO(int rw, struct kiocb *iocb, | 127 | static ssize_t hfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
128 | struct iov_iter *iter, loff_t offset) | 128 | loff_t offset) |
129 | { | 129 | { |
130 | struct file *file = iocb->ki_filp; | 130 | struct file *file = iocb->ki_filp; |
131 | struct address_space *mapping = file->f_mapping; | 131 | struct address_space *mapping = file->f_mapping; |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index afcde36b506b..a43811f90935 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -122,8 +122,8 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask) | |||
122 | return res ? try_to_free_buffers(page) : 0; | 122 | return res ? try_to_free_buffers(page) : 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static ssize_t hfsplus_direct_IO(int rw, struct kiocb *iocb, | 125 | static ssize_t hfsplus_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
126 | struct iov_iter *iter, loff_t offset) | 126 | loff_t offset) |
127 | { | 127 | { |
128 | struct file *file = iocb->ki_filp; | 128 | struct file *file = iocb->ki_filp; |
129 | struct address_space *mapping = file->f_mapping; | 129 | struct address_space *mapping = file->f_mapping; |
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index e7047b63ffc5..070dc4b33544 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -330,8 +330,8 @@ static sector_t jfs_bmap(struct address_space *mapping, sector_t block) | |||
330 | return generic_block_bmap(mapping, block, jfs_get_block); | 330 | return generic_block_bmap(mapping, block, jfs_get_block); |
331 | } | 331 | } |
332 | 332 | ||
333 | static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb, | 333 | static ssize_t jfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
334 | struct iov_iter *iter, loff_t offset) | 334 | 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; |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index e8482b8f4830..06503bc604e1 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -240,7 +240,6 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq, | |||
240 | 240 | ||
241 | /** | 241 | /** |
242 | * nfs_direct_IO - NFS address space operation for direct I/O | 242 | * nfs_direct_IO - NFS address space operation for direct I/O |
243 | * @rw: direction (read or write) | ||
244 | * @iocb: target I/O control block | 243 | * @iocb: target I/O control block |
245 | * @iov: array of vectors that define I/O buffer | 244 | * @iov: array of vectors that define I/O buffer |
246 | * @pos: offset in file to begin the operation | 245 | * @pos: offset in file to begin the operation |
@@ -251,7 +250,7 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq, | |||
251 | * shunt off direct read and write requests before the VFS gets them, | 250 | * shunt off direct read and write requests before the VFS gets them, |
252 | * so this method is only ever called for swap. | 251 | * so this method is only ever called for swap. |
253 | */ | 252 | */ |
254 | ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t pos) | 253 | ssize_t nfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t pos) |
255 | { | 254 | { |
256 | struct inode *inode = iocb->ki_filp->f_mapping->host; | 255 | struct inode *inode = iocb->ki_filp->f_mapping->host; |
257 | 256 | ||
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 4726f1493d5d..36f057fa8aa3 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -305,8 +305,7 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping, | |||
305 | } | 305 | } |
306 | 306 | ||
307 | static ssize_t | 307 | static ssize_t |
308 | nilfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, | 308 | nilfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset) |
309 | loff_t offset) | ||
310 | { | 309 | { |
311 | struct file *file = iocb->ki_filp; | 310 | struct file *file = iocb->ki_filp; |
312 | struct address_space *mapping = file->f_mapping; | 311 | struct address_space *mapping = file->f_mapping; |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 0ee9474cca46..28b5ad81bbec 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -818,9 +818,7 @@ out: | |||
818 | return ret; | 818 | return ret; |
819 | } | 819 | } |
820 | 820 | ||
821 | static ssize_t ocfs2_direct_IO(int rw, | 821 | static ssize_t ocfs2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
822 | struct kiocb *iocb, | ||
823 | struct iov_iter *iter, | ||
824 | loff_t offset) | 822 | loff_t offset) |
825 | { | 823 | { |
826 | struct file *file = iocb->ki_filp; | 824 | struct file *file = iocb->ki_filp; |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index d61ab13244a8..742242b60972 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -3278,8 +3278,8 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags) | |||
3278 | * We thank Mingming Cao for helping us understand in great detail what | 3278 | * We thank Mingming Cao for helping us understand in great detail what |
3279 | * to do in this section of the code. | 3279 | * to do in this section of the code. |
3280 | */ | 3280 | */ |
3281 | static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb, | 3281 | static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
3282 | struct iov_iter *iter, loff_t offset) | 3282 | loff_t offset) |
3283 | { | 3283 | { |
3284 | struct file *file = iocb->ki_filp; | 3284 | struct file *file = iocb->ki_filp; |
3285 | struct inode *inode = file->f_mapping->host; | 3285 | struct inode *inode = file->f_mapping->host; |
diff --git a/fs/udf/file.c b/fs/udf/file.c index 74050bff64f4..78d42548b260 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -100,8 +100,7 @@ static int udf_adinicb_write_begin(struct file *file, | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | static ssize_t udf_adinicb_direct_IO(int rw, struct kiocb *iocb, | 103 | static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
104 | struct iov_iter *iter, | ||
105 | loff_t offset) | 104 | loff_t offset) |
106 | { | 105 | { |
107 | /* Fallback to buffered I/O. */ | 106 | /* Fallback to buffered I/O. */ |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index a685aea93068..4f178c83b04f 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -215,8 +215,7 @@ static int udf_write_begin(struct file *file, struct address_space *mapping, | |||
215 | return ret; | 215 | return ret; |
216 | } | 216 | } |
217 | 217 | ||
218 | static ssize_t udf_direct_IO(int rw, struct kiocb *iocb, | 218 | static ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter, |
219 | struct iov_iter *iter, | ||
220 | loff_t offset) | 219 | loff_t offset) |
221 | { | 220 | { |
222 | struct file *file = iocb->ki_filp; | 221 | struct file *file = iocb->ki_filp; |
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 532d5279df2f..1d8eef9cf0f5 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -1495,7 +1495,6 @@ xfs_end_io_direct_write( | |||
1495 | 1495 | ||
1496 | STATIC ssize_t | 1496 | STATIC ssize_t |
1497 | xfs_vm_direct_IO( | 1497 | xfs_vm_direct_IO( |
1498 | int rw, | ||
1499 | struct kiocb *iocb, | 1498 | struct kiocb *iocb, |
1500 | struct iov_iter *iter, | 1499 | struct iov_iter *iter, |
1501 | loff_t offset) | 1500 | loff_t offset) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 295bc589fe1b..72e3759de8c3 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -383,7 +383,7 @@ struct address_space_operations { | |||
383 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 383 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
384 | int (*releasepage) (struct page *, gfp_t); | 384 | int (*releasepage) (struct page *, gfp_t); |
385 | void (*freepage)(struct page *); | 385 | void (*freepage)(struct page *); |
386 | ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); | 386 | ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter, loff_t offset); |
387 | /* | 387 | /* |
388 | * migrate the contents of a page to the specified target. If | 388 | * migrate the contents of a page to the specified target. If |
389 | * migrate_mode is MIGRATE_ASYNC, it must not block. | 389 | * migrate_mode is MIGRATE_ASYNC, it must not block. |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index b01ccf371fdc..3d1b0d2fe55e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -447,7 +447,7 @@ static inline struct rpc_cred *nfs_file_cred(struct file *file) | |||
447 | /* | 447 | /* |
448 | * linux/fs/nfs/direct.c | 448 | * linux/fs/nfs/direct.c |
449 | */ | 449 | */ |
450 | extern ssize_t nfs_direct_IO(int, struct kiocb *, struct iov_iter *, loff_t); | 450 | extern ssize_t nfs_direct_IO(struct kiocb *, struct iov_iter *, loff_t); |
451 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, | 451 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, |
452 | struct iov_iter *iter, | 452 | struct iov_iter *iter, |
453 | loff_t pos); | 453 | loff_t pos); |
diff --git a/mm/filemap.c b/mm/filemap.c index 876f4e6f3ed6..9920db455f05 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1707,7 +1707,7 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter) | |||
1707 | pos + count - 1); | 1707 | pos + count - 1); |
1708 | if (!retval) { | 1708 | if (!retval) { |
1709 | struct iov_iter data = *iter; | 1709 | struct iov_iter data = *iter; |
1710 | retval = mapping->a_ops->direct_IO(READ, iocb, &data, pos); | 1710 | retval = mapping->a_ops->direct_IO(iocb, &data, pos); |
1711 | } | 1711 | } |
1712 | 1712 | ||
1713 | if (retval > 0) { | 1713 | if (retval > 0) { |
@@ -2395,7 +2395,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos) | |||
2395 | } | 2395 | } |
2396 | 2396 | ||
2397 | data = *from; | 2397 | data = *from; |
2398 | written = mapping->a_ops->direct_IO(WRITE, iocb, &data, pos); | 2398 | written = mapping->a_ops->direct_IO(iocb, &data, pos); |
2399 | 2399 | ||
2400 | /* | 2400 | /* |
2401 | * Finally, try again to invalidate clean pages which might have been | 2401 | * Finally, try again to invalidate clean pages which might have been |
diff --git a/mm/page_io.c b/mm/page_io.c index a96c8562d835..6424869e275e 100644 --- a/mm/page_io.c +++ b/mm/page_io.c | |||
@@ -277,9 +277,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, | |||
277 | 277 | ||
278 | set_page_writeback(page); | 278 | set_page_writeback(page); |
279 | unlock_page(page); | 279 | unlock_page(page); |
280 | ret = mapping->a_ops->direct_IO(ITER_BVEC | WRITE, | 280 | ret = mapping->a_ops->direct_IO(&kiocb, &from, kiocb.ki_pos); |
281 | &kiocb, &from, | ||
282 | kiocb.ki_pos); | ||
283 | if (ret == PAGE_SIZE) { | 281 | if (ret == PAGE_SIZE) { |
284 | count_vm_event(PSWPOUT); | 282 | count_vm_event(PSWPOUT); |
285 | ret = 0; | 283 | ret = 0; |