aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/page.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/page.c')
-rw-r--r--fs/gfs2/page.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/gfs2/page.c b/fs/gfs2/page.c
index 3542aa6b01c4..a2c9e93c7c39 100644
--- a/fs/gfs2/page.c
+++ b/fs/gfs2/page.c
@@ -14,14 +14,18 @@
14#include <linux/buffer_head.h> 14#include <linux/buffer_head.h>
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/gfs2_ondisk.h>
17#include <asm/semaphore.h> 18#include <asm/semaphore.h>
18 19
19#include "gfs2.h" 20#include "gfs2.h"
21#include "lm_interface.h"
22#include "incore.h"
20#include "bmap.h" 23#include "bmap.h"
21#include "inode.h" 24#include "inode.h"
22#include "page.h" 25#include "page.h"
23#include "trans.h" 26#include "trans.h"
24#include "ops_address.h" 27#include "ops_address.h"
28#include "util.h"
25 29
26/** 30/**
27 * gfs2_pte_inval - Sync and invalidate all PTEs associated with a glock 31 * gfs2_pte_inval - Sync and invalidate all PTEs associated with a glock
@@ -34,7 +38,7 @@ void gfs2_pte_inval(struct gfs2_glock *gl)
34 struct gfs2_inode *ip; 38 struct gfs2_inode *ip;
35 struct inode *inode; 39 struct inode *inode;
36 40
37 ip = get_gl2ip(gl); 41 ip = gl->gl_object;
38 if (!ip || !S_ISREG(ip->i_di.di_mode)) 42 if (!ip || !S_ISREG(ip->i_di.di_mode))
39 return; 43 return;
40 44
@@ -64,7 +68,7 @@ void gfs2_page_inval(struct gfs2_glock *gl)
64 struct gfs2_inode *ip; 68 struct gfs2_inode *ip;
65 struct inode *inode; 69 struct inode *inode;
66 70
67 ip = get_gl2ip(gl); 71 ip = gl->gl_object;
68 if (!ip || !S_ISREG(ip->i_di.di_mode)) 72 if (!ip || !S_ISREG(ip->i_di.di_mode))
69 return; 73 return;
70 74
@@ -95,7 +99,7 @@ void gfs2_page_sync(struct gfs2_glock *gl, int flags)
95 struct gfs2_inode *ip; 99 struct gfs2_inode *ip;
96 struct inode *inode; 100 struct inode *inode;
97 101
98 ip = get_gl2ip(gl); 102 ip = gl->gl_object;
99 if (!ip || !S_ISREG(ip->i_di.di_mode)) 103 if (!ip || !S_ISREG(ip->i_di.di_mode))
100 return; 104 return;
101 105
@@ -192,7 +196,7 @@ int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh,
192int gfs2_block_truncate_page(struct address_space *mapping) 196int gfs2_block_truncate_page(struct address_space *mapping)
193{ 197{
194 struct inode *inode = mapping->host; 198 struct inode *inode = mapping->host;
195 struct gfs2_inode *ip = get_v2ip(inode); 199 struct gfs2_inode *ip = inode->u.generic_ip;
196 struct gfs2_sbd *sdp = ip->i_sbd; 200 struct gfs2_sbd *sdp = ip->i_sbd;
197 loff_t from = inode->i_size; 201 loff_t from = inode->i_size;
198 unsigned long index = from >> PAGE_CACHE_SHIFT; 202 unsigned long index = from >> PAGE_CACHE_SHIFT;