diff options
Diffstat (limited to 'fs/gfs2/aops.c')
| -rw-r--r-- | fs/gfs2/aops.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index ce62dcac90b6..e84ddaa42104 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
| @@ -1041,8 +1041,7 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset) | |||
| 1041 | 1041 | ||
| 1042 | 1042 | ||
| 1043 | static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, | 1043 | static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, |
| 1044 | const struct iovec *iov, loff_t offset, | 1044 | struct iov_iter *iter, loff_t offset) |
| 1045 | unsigned long nr_segs) | ||
| 1046 | { | 1045 | { |
| 1047 | struct file *file = iocb->ki_filp; | 1046 | struct file *file = iocb->ki_filp; |
| 1048 | struct inode *inode = file->f_mapping->host; | 1047 | struct inode *inode = file->f_mapping->host; |
| @@ -1082,7 +1081,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, | |||
| 1082 | */ | 1081 | */ |
| 1083 | if (mapping->nrpages) { | 1082 | if (mapping->nrpages) { |
| 1084 | loff_t lstart = offset & (PAGE_CACHE_SIZE - 1); | 1083 | loff_t lstart = offset & (PAGE_CACHE_SIZE - 1); |
| 1085 | loff_t len = iov_length(iov, nr_segs); | 1084 | loff_t len = iov_length(iter->iov, iter->nr_segs); |
| 1086 | loff_t end = PAGE_ALIGN(offset + len) - 1; | 1085 | loff_t end = PAGE_ALIGN(offset + len) - 1; |
| 1087 | 1086 | ||
| 1088 | rv = 0; | 1087 | rv = 0; |
| @@ -1097,9 +1096,9 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, | |||
| 1097 | truncate_inode_pages_range(mapping, lstart, end); | 1096 | truncate_inode_pages_range(mapping, lstart, end); |
| 1098 | } | 1097 | } |
| 1099 | 1098 | ||
| 1100 | rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, | 1099 | rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, |
| 1101 | offset, nr_segs, gfs2_get_block_direct, | 1100 | iter->iov, offset, iter->nr_segs, |
| 1102 | NULL, NULL, 0); | 1101 | gfs2_get_block_direct, NULL, NULL, 0); |
| 1103 | out: | 1102 | out: |
| 1104 | gfs2_glock_dq(&gh); | 1103 | gfs2_glock_dq(&gh); |
| 1105 | gfs2_holder_uninit(&gh); | 1104 | gfs2_holder_uninit(&gh); |
