aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r--fs/gfs2/ops_address.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 574b222feefc..0df560f4269a 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -451,8 +451,8 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
451 451
452 kaddr = kmap_atomic(page, KM_USER0); 452 kaddr = kmap_atomic(page, KM_USER0);
453 memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), 453 memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode),
454 ip->i_di.di_size); 454 ip->i_disksize);
455 memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size); 455 memset(kaddr + ip->i_disksize, 0, PAGE_CACHE_SIZE - ip->i_disksize);
456 kunmap_atomic(kaddr, KM_USER0); 456 kunmap_atomic(kaddr, KM_USER0);
457 flush_dcache_page(page); 457 flush_dcache_page(page);
458 brelse(dibh); 458 brelse(dibh);
@@ -780,7 +780,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
780 780
781 if (inode->i_size < to) { 781 if (inode->i_size < to) {
782 i_size_write(inode, to); 782 i_size_write(inode, to);
783 ip->i_di.di_size = inode->i_size; 783 ip->i_disksize = inode->i_size;
784 di->di_size = cpu_to_be64(inode->i_size); 784 di->di_size = cpu_to_be64(inode->i_size);
785 mark_inode_dirty(inode); 785 mark_inode_dirty(inode);
786 } 786 }
@@ -845,9 +845,9 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,
845 845
846 ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata); 846 ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
847 847
848 if (likely(ret >= 0) && (inode->i_size > ip->i_di.di_size)) { 848 if (likely(ret >= 0) && (inode->i_size > ip->i_disksize)) {
849 di = (struct gfs2_dinode *)dibh->b_data; 849 di = (struct gfs2_dinode *)dibh->b_data;
850 ip->i_di.di_size = inode->i_size; 850 ip->i_disksize = inode->i_size;
851 di->di_size = cpu_to_be64(inode->i_size); 851 di->di_size = cpu_to_be64(inode->i_size);
852 mark_inode_dirty(inode); 852 mark_inode_dirty(inode);
853 } 853 }