aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/aops.c')
-rw-r--r--fs/gfs2/aops.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index ce62dcac90b6..805b37fed638 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -431,7 +431,7 @@ static int gfs2_jdata_writepages(struct address_space *mapping,
431 431
432 ret = gfs2_write_cache_jdata(mapping, wbc); 432 ret = gfs2_write_cache_jdata(mapping, wbc);
433 if (ret == 0 && wbc->sync_mode == WB_SYNC_ALL) { 433 if (ret == 0 && wbc->sync_mode == WB_SYNC_ALL) {
434 gfs2_log_flush(sdp, ip->i_gl); 434 gfs2_log_flush(sdp, ip->i_gl, NORMAL_FLUSH);
435 ret = gfs2_write_cache_jdata(mapping, wbc); 435 ret = gfs2_write_cache_jdata(mapping, wbc);
436 } 436 }
437 return ret; 437 return ret;
@@ -577,7 +577,6 @@ int gfs2_internal_read(struct gfs2_inode *ip, char *buf, loff_t *pos,
577 p = kmap_atomic(page); 577 p = kmap_atomic(page);
578 memcpy(buf + copied, p + offset, amt); 578 memcpy(buf + copied, p + offset, amt);
579 kunmap_atomic(p); 579 kunmap_atomic(p);
580 mark_page_accessed(page);
581 page_cache_release(page); 580 page_cache_release(page);
582 copied += amt; 581 copied += amt;
583 index++; 582 index++;
@@ -1041,8 +1040,7 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset)
1041 1040
1042 1041
1043static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, 1042static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
1044 const struct iovec *iov, loff_t offset, 1043 struct iov_iter *iter, loff_t offset)
1045 unsigned long nr_segs)
1046{ 1044{
1047 struct file *file = iocb->ki_filp; 1045 struct file *file = iocb->ki_filp;
1048 struct inode *inode = file->f_mapping->host; 1046 struct inode *inode = file->f_mapping->host;
@@ -1082,7 +1080,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
1082 */ 1080 */
1083 if (mapping->nrpages) { 1081 if (mapping->nrpages) {
1084 loff_t lstart = offset & (PAGE_CACHE_SIZE - 1); 1082 loff_t lstart = offset & (PAGE_CACHE_SIZE - 1);
1085 loff_t len = iov_length(iov, nr_segs); 1083 loff_t len = iov_iter_count(iter);
1086 loff_t end = PAGE_ALIGN(offset + len) - 1; 1084 loff_t end = PAGE_ALIGN(offset + len) - 1;
1087 1085
1088 rv = 0; 1086 rv = 0;
@@ -1097,9 +1095,9 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
1097 truncate_inode_pages_range(mapping, lstart, end); 1095 truncate_inode_pages_range(mapping, lstart, end);
1098 } 1096 }
1099 1097
1100 rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 1098 rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev,
1101 offset, nr_segs, gfs2_get_block_direct, 1099 iter, offset,
1102 NULL, NULL, 0); 1100 gfs2_get_block_direct, NULL, NULL, 0);
1103out: 1101out:
1104 gfs2_glock_dq(&gh); 1102 gfs2_glock_dq(&gh);
1105 gfs2_holder_uninit(&gh); 1103 gfs2_holder_uninit(&gh);