diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-13 07:27:43 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-13 07:27:43 -0500 |
commit | 7359a19cc758946aba0e45233b8641256b194884 (patch) | |
tree | d96aaeb2fb239efe6fdb0b4698eb94108719f423 /fs/gfs2/glops.c | |
parent | 18ec7d5c3f434aed9661ed10a9e1f48cdeb4981d (diff) |
[GFS2] Fix for root inode ref count bug
Umount is now working correctly again. The bug was due to
not getting an extra ref count when mounting the fs. We
should have bumped it by two (once for the internal pointer
to the root inode from the super block and once for the
inode hanging off the dcache entry for root).
Also this patch tidys up the code dealing with looking up
and creating inodes. We now pass Linux inodes (with gfs2_inodes
attached) rather than the other way around and this reduces code
duplication in various places.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 127008146a57..27374306ecde 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c | |||
@@ -358,13 +358,13 @@ static void trans_go_xmote_th(struct gfs2_glock *gl, unsigned int state, | |||
358 | static void trans_go_xmote_bh(struct gfs2_glock *gl) | 358 | static void trans_go_xmote_bh(struct gfs2_glock *gl) |
359 | { | 359 | { |
360 | struct gfs2_sbd *sdp = gl->gl_sbd; | 360 | struct gfs2_sbd *sdp = gl->gl_sbd; |
361 | struct gfs2_glock *j_gl = sdp->sd_jdesc->jd_inode->i_gl; | 361 | struct gfs2_glock *j_gl = get_v2ip(sdp->sd_jdesc->jd_inode)->i_gl; |
362 | struct gfs2_log_header head; | 362 | struct gfs2_log_header head; |
363 | int error; | 363 | int error; |
364 | 364 | ||
365 | if (gl->gl_state != LM_ST_UNLOCKED && | 365 | if (gl->gl_state != LM_ST_UNLOCKED && |
366 | test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { | 366 | test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { |
367 | gfs2_meta_cache_flush(sdp->sd_jdesc->jd_inode); | 367 | gfs2_meta_cache_flush(get_v2ip(sdp->sd_jdesc->jd_inode)); |
368 | j_gl->gl_ops->go_inval(j_gl, DIO_METADATA | DIO_DATA); | 368 | j_gl->gl_ops->go_inval(j_gl, DIO_METADATA | DIO_DATA); |
369 | 369 | ||
370 | error = gfs2_find_jhead(sdp->sd_jdesc, &head); | 370 | error = gfs2_find_jhead(sdp->sd_jdesc, &head); |