aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/lops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r--fs/gfs2/lops.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index e4c75a74df5b..a76f1a778920 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -184,8 +184,7 @@ static void buf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
184static void buf_lo_before_scan(struct gfs2_jdesc *jd, 184static void buf_lo_before_scan(struct gfs2_jdesc *jd,
185 struct gfs2_log_header *head, int pass) 185 struct gfs2_log_header *head, int pass)
186{ 186{
187 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 187 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
188 struct gfs2_sbd *sdp = ip->i_sbd;
189 188
190 if (pass != 0) 189 if (pass != 0)
191 return; 190 return;
@@ -198,8 +197,8 @@ static int buf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
198 struct gfs2_log_descriptor *ld, __be64 *ptr, 197 struct gfs2_log_descriptor *ld, __be64 *ptr,
199 int pass) 198 int pass)
200{ 199{
201 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 200 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
202 struct gfs2_sbd *sdp = ip->i_sbd; 201 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
203 struct gfs2_glock *gl = ip->i_gl; 202 struct gfs2_glock *gl = ip->i_gl;
204 unsigned int blks = be32_to_cpu(ld->ld_data1); 203 unsigned int blks = be32_to_cpu(ld->ld_data1);
205 struct buffer_head *bh_log, *bh_ip; 204 struct buffer_head *bh_log, *bh_ip;
@@ -245,8 +244,8 @@ static int buf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
245 244
246static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) 245static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
247{ 246{
248 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 247 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
249 struct gfs2_sbd *sdp = ip->i_sbd; 248 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
250 249
251 if (error) { 250 if (error) {
252 gfs2_meta_sync(ip->i_gl, 251 gfs2_meta_sync(ip->i_gl,
@@ -332,8 +331,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
332static void revoke_lo_before_scan(struct gfs2_jdesc *jd, 331static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
333 struct gfs2_log_header *head, int pass) 332 struct gfs2_log_header *head, int pass)
334{ 333{
335 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 334 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
336 struct gfs2_sbd *sdp = ip->i_sbd;
337 335
338 if (pass != 0) 336 if (pass != 0)
339 return; 337 return;
@@ -346,8 +344,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
346 struct gfs2_log_descriptor *ld, __be64 *ptr, 344 struct gfs2_log_descriptor *ld, __be64 *ptr,
347 int pass) 345 int pass)
348{ 346{
349 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 347 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
350 struct gfs2_sbd *sdp = ip->i_sbd;
351 unsigned int blks = be32_to_cpu(ld->ld_length); 348 unsigned int blks = be32_to_cpu(ld->ld_length);
352 unsigned int revokes = be32_to_cpu(ld->ld_data1); 349 unsigned int revokes = be32_to_cpu(ld->ld_data1);
353 struct buffer_head *bh; 350 struct buffer_head *bh;
@@ -393,8 +390,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
393 390
394static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) 391static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
395{ 392{
396 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 393 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
397 struct gfs2_sbd *sdp = ip->i_sbd;
398 394
399 if (error) { 395 if (error) {
400 gfs2_revoke_clean(sdp); 396 gfs2_revoke_clean(sdp);
@@ -465,7 +461,7 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
465 struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le); 461 struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le);
466 struct gfs2_trans *tr = current->journal_info; 462 struct gfs2_trans *tr = current->journal_info;
467 struct address_space *mapping = bd->bd_bh->b_page->mapping; 463 struct address_space *mapping = bd->bd_bh->b_page->mapping;
468 struct gfs2_inode *ip = mapping->host->u.generic_ip; 464 struct gfs2_inode *ip = GFS2_I(mapping->host);
469 465
470 tr->tr_touched = 1; 466 tr->tr_touched = 1;
471 if (!list_empty(&bd->bd_list_tr) && 467 if (!list_empty(&bd->bd_list_tr) &&
@@ -665,8 +661,8 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
665 struct gfs2_log_descriptor *ld, 661 struct gfs2_log_descriptor *ld,
666 __be64 *ptr, int pass) 662 __be64 *ptr, int pass)
667{ 663{
668 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 664 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
669 struct gfs2_sbd *sdp = ip->i_sbd; 665 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
670 struct gfs2_glock *gl = ip->i_gl; 666 struct gfs2_glock *gl = ip->i_gl;
671 unsigned int blks = be32_to_cpu(ld->ld_data1); 667 unsigned int blks = be32_to_cpu(ld->ld_data1);
672 struct buffer_head *bh_log, *bh_ip; 668 struct buffer_head *bh_log, *bh_ip;
@@ -716,8 +712,8 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
716 712
717static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) 713static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
718{ 714{
719 struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; 715 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
720 struct gfs2_sbd *sdp = ip->i_sbd; 716 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
721 717
722 if (error) { 718 if (error) {
723 gfs2_meta_sync(ip->i_gl, 719 gfs2_meta_sync(ip->i_gl,