diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-04 21:27:34 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 17:32:44 -0400 |
commit | d8d3d94b80aa1a1c0ca75c58b8abdc7356f38418 (patch) | |
tree | 132f846b04371426b8795475597846aae75e7e07 /fs/ext3/inode.c | |
parent | cb66a7a1f149ff705fa37cad6d1252b046e0ad4f (diff) |
pass iov_iter to ->direct_IO()
unmodified, for now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r-- | fs/ext3/inode.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index f5157d0d1b43..7a5c501dc31b 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1820,8 +1820,7 @@ static int ext3_releasepage(struct page *page, gfp_t wait) | |||
1820 | * VFS code falls back into buffered path in that case so we are safe. | 1820 | * VFS code falls back into buffered path in that case so we are safe. |
1821 | */ | 1821 | */ |
1822 | static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, | 1822 | static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, |
1823 | const struct iovec *iov, loff_t offset, | 1823 | struct iov_iter *iter, loff_t offset) |
1824 | unsigned long nr_segs) | ||
1825 | { | 1824 | { |
1826 | struct file *file = iocb->ki_filp; | 1825 | struct file *file = iocb->ki_filp; |
1827 | struct inode *inode = file->f_mapping->host; | 1826 | struct inode *inode = file->f_mapping->host; |
@@ -1829,10 +1828,10 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, | |||
1829 | handle_t *handle; | 1828 | handle_t *handle; |
1830 | ssize_t ret; | 1829 | ssize_t ret; |
1831 | int orphan = 0; | 1830 | int orphan = 0; |
1832 | size_t count = iov_length(iov, nr_segs); | 1831 | size_t count = iov_length(iter->iov, iter->nr_segs); |
1833 | int retries = 0; | 1832 | int retries = 0; |
1834 | 1833 | ||
1835 | trace_ext3_direct_IO_enter(inode, offset, iov_length(iov, nr_segs), rw); | 1834 | trace_ext3_direct_IO_enter(inode, offset, count, rw); |
1836 | 1835 | ||
1837 | if (rw == WRITE) { | 1836 | if (rw == WRITE) { |
1838 | loff_t final_size = offset + count; | 1837 | loff_t final_size = offset + count; |
@@ -1856,15 +1855,15 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, | |||
1856 | } | 1855 | } |
1857 | 1856 | ||
1858 | retry: | 1857 | retry: |
1859 | ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, | 1858 | ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset, |
1860 | ext3_get_block); | 1859 | iter->nr_segs, ext3_get_block); |
1861 | /* | 1860 | /* |
1862 | * In case of error extending write may have instantiated a few | 1861 | * In case of error extending write may have instantiated a few |
1863 | * blocks outside i_size. Trim these off again. | 1862 | * blocks outside i_size. Trim these off again. |
1864 | */ | 1863 | */ |
1865 | if (unlikely((rw & WRITE) && ret < 0)) { | 1864 | if (unlikely((rw & WRITE) && ret < 0)) { |
1866 | loff_t isize = i_size_read(inode); | 1865 | loff_t isize = i_size_read(inode); |
1867 | loff_t end = offset + iov_length(iov, nr_segs); | 1866 | loff_t end = offset + count; |
1868 | 1867 | ||
1869 | if (end > isize) | 1868 | if (end > isize) |
1870 | ext3_truncate_failed_direct_write(inode); | 1869 | ext3_truncate_failed_direct_write(inode); |
@@ -1909,8 +1908,7 @@ retry: | |||
1909 | ret = err; | 1908 | ret = err; |
1910 | } | 1909 | } |
1911 | out: | 1910 | out: |
1912 | trace_ext3_direct_IO_exit(inode, offset, | 1911 | trace_ext3_direct_IO_exit(inode, offset, count, rw, ret); |
1913 | iov_length(iov, nr_segs), rw, ret); | ||
1914 | return ret; | 1912 | return ret; |
1915 | } | 1913 | } |
1916 | 1914 | ||