aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_vm.c')
-rw-r--r--fs/gfs2/ops_vm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c
index 263c1fb7bbaf..08709f19ea98 100644
--- a/fs/gfs2/ops_vm.c
+++ b/fs/gfs2/ops_vm.c
@@ -38,15 +38,15 @@ static void pfault_be_greedy(struct gfs2_inode *ip)
38 ip->i_last_pfault = jiffies; 38 ip->i_last_pfault = jiffies;
39 spin_unlock(&ip->i_spin); 39 spin_unlock(&ip->i_spin);
40 40
41 gfs2_inode_hold(ip); 41 igrab(&ip->i_inode);
42 if (gfs2_glock_be_greedy(ip->i_gl, time)) 42 if (gfs2_glock_be_greedy(ip->i_gl, time))
43 gfs2_inode_put(ip); 43 iput(&ip->i_inode);
44} 44}
45 45
46static struct page *gfs2_private_nopage(struct vm_area_struct *area, 46static struct page *gfs2_private_nopage(struct vm_area_struct *area,
47 unsigned long address, int *type) 47 unsigned long address, int *type)
48{ 48{
49 struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip; 49 struct gfs2_inode *ip = GFS2_I(area->vm_file->f_mapping->host);
50 struct gfs2_holder i_gh; 50 struct gfs2_holder i_gh;
51 struct page *result; 51 struct page *result;
52 int error; 52 int error;
@@ -69,7 +69,7 @@ static struct page *gfs2_private_nopage(struct vm_area_struct *area,
69 69
70static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) 70static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
71{ 71{
72 struct gfs2_sbd *sdp = ip->i_sbd; 72 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
73 unsigned long index = page->index; 73 unsigned long index = page->index;
74 uint64_t lblock = index << (PAGE_CACHE_SHIFT - 74 uint64_t lblock = index << (PAGE_CACHE_SHIFT -
75 sdp->sd_sb.sb_bsize_shift); 75 sdp->sd_sb.sb_bsize_shift);
@@ -114,7 +114,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
114 unsigned int extlen; 114 unsigned int extlen;
115 int new = 1; 115 int new = 1;
116 116
117 error = gfs2_extent_map(ip->i_vnode, lblock, &new, &dblock, &extlen); 117 error = gfs2_extent_map(&ip->i_inode, lblock, &new, &dblock, &extlen);
118 if (error) 118 if (error)
119 goto out_trans; 119 goto out_trans;
120 120
@@ -142,7 +142,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
142static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area, 142static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area,
143 unsigned long address, int *type) 143 unsigned long address, int *type)
144{ 144{
145 struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip; 145 struct gfs2_inode *ip = GFS2_I(area->vm_file->f_mapping->host);
146 struct gfs2_holder i_gh; 146 struct gfs2_holder i_gh;
147 struct page *result = NULL; 147 struct page *result = NULL;
148 unsigned long index = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) + 148 unsigned long index = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) +