diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index cab7ab5fb506..bae32ba0c481 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -271,7 +271,7 @@ int gfs2_do_upgrade(struct gfs2_sbd *sdp, struct gfs2_glock *sb_gl) | |||
271 | 271 | ||
272 | int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | 272 | int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) |
273 | { | 273 | { |
274 | struct gfs2_inode *dip = sdp->sd_jindex; | 274 | struct gfs2_inode *dip = get_v2ip(sdp->sd_jindex); |
275 | struct qstr name; | 275 | struct qstr name; |
276 | char buf[20]; | 276 | char buf[20]; |
277 | struct gfs2_jdesc *jd; | 277 | struct gfs2_jdesc *jd; |
@@ -289,7 +289,7 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | |||
289 | 289 | ||
290 | name.len = sprintf(buf, "journal%u", sdp->sd_journals); | 290 | name.len = sprintf(buf, "journal%u", sdp->sd_journals); |
291 | 291 | ||
292 | error = gfs2_dir_search(sdp->sd_jindex, &name, NULL, NULL); | 292 | error = gfs2_dir_search(get_v2ip(sdp->sd_jindex), &name, NULL, NULL); |
293 | if (error == -ENOENT) { | 293 | if (error == -ENOENT) { |
294 | error = 0; | 294 | error = 0; |
295 | break; | 295 | break; |
@@ -437,6 +437,7 @@ int gfs2_jdesc_check(struct gfs2_jdesc *jd) | |||
437 | 437 | ||
438 | int gfs2_lookup_master_dir(struct gfs2_sbd *sdp) | 438 | int gfs2_lookup_master_dir(struct gfs2_sbd *sdp) |
439 | { | 439 | { |
440 | struct inode *inode = NULL; | ||
440 | struct gfs2_glock *gl; | 441 | struct gfs2_glock *gl; |
441 | int error; | 442 | int error; |
442 | 443 | ||
@@ -444,8 +445,8 @@ int gfs2_lookup_master_dir(struct gfs2_sbd *sdp) | |||
444 | sdp->sd_sb.sb_master_dir.no_addr, | 445 | sdp->sd_sb.sb_master_dir.no_addr, |
445 | &gfs2_inode_glops, CREATE, &gl); | 446 | &gfs2_inode_glops, CREATE, &gl); |
446 | if (!error) { | 447 | if (!error) { |
447 | error = gfs2_inode_get(gl, &sdp->sd_sb.sb_master_dir, CREATE, | 448 | error = gfs2_lookup_simple(sdp->sd_root_dir, ".gfs2_admin", &inode); |
448 | &sdp->sd_master_dir); | 449 | sdp->sd_master_dir = inode; |
449 | gfs2_glock_put(gl); | 450 | gfs2_glock_put(gl); |
450 | } | 451 | } |
451 | 452 | ||
@@ -549,9 +550,9 @@ int gfs2_make_fs_ro(struct gfs2_sbd *sdp) | |||
549 | 550 | ||
550 | int gfs2_statfs_init(struct gfs2_sbd *sdp) | 551 | int gfs2_statfs_init(struct gfs2_sbd *sdp) |
551 | { | 552 | { |
552 | struct gfs2_inode *m_ip = sdp->sd_statfs_inode; | 553 | struct gfs2_inode *m_ip = get_v2ip(sdp->sd_statfs_inode); |
553 | struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; | 554 | struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; |
554 | struct gfs2_inode *l_ip = sdp->sd_sc_inode; | 555 | struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode); |
555 | struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; | 556 | struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; |
556 | struct buffer_head *m_bh, *l_bh; | 557 | struct buffer_head *m_bh, *l_bh; |
557 | struct gfs2_holder gh; | 558 | struct gfs2_holder gh; |
@@ -598,7 +599,7 @@ int gfs2_statfs_init(struct gfs2_sbd *sdp) | |||
598 | void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, | 599 | void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, |
599 | int64_t dinodes) | 600 | int64_t dinodes) |
600 | { | 601 | { |
601 | struct gfs2_inode *l_ip = sdp->sd_sc_inode; | 602 | struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode); |
602 | struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; | 603 | struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; |
603 | struct buffer_head *l_bh; | 604 | struct buffer_head *l_bh; |
604 | int error; | 605 | int error; |
@@ -624,8 +625,8 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, | |||
624 | 625 | ||
625 | int gfs2_statfs_sync(struct gfs2_sbd *sdp) | 626 | int gfs2_statfs_sync(struct gfs2_sbd *sdp) |
626 | { | 627 | { |
627 | struct gfs2_inode *m_ip = sdp->sd_statfs_inode; | 628 | struct gfs2_inode *m_ip = get_v2ip(sdp->sd_statfs_inode); |
628 | struct gfs2_inode *l_ip = sdp->sd_sc_inode; | 629 | struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode); |
629 | struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; | 630 | struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; |
630 | struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; | 631 | struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; |
631 | struct gfs2_holder gh; | 632 | struct gfs2_holder gh; |