diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-07 11:17:32 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-07 11:17:32 -0400 |
commit | b09e593d799560f1a0782c20ac5900058390a26f (patch) | |
tree | 20f04bd2c8ba9c09ac80a7bb1400d341c4fd7e21 /fs/gfs2/glops.c | |
parent | 55eccc6d00cea224bf634d44e9871cfe83200ff2 (diff) |
[GFS2] Fix a ref count bug and other clean ups
This fixes a ref count bug that sometimes showed up a umount time
(causing it to hang) but it otherwise mostly harmless. At the same
time there are some clean ups including making the log operations
structures const, moving a memory allocation so that its not done
in the fast path of checking to see if there is an outstanding
transaction related to a particular glock.
Removes the sd_log_wrap varaible which was updated, but never actually
used anywhere. Updates the gfs2 ioctl() to run without the kernel lock
(which it never needed anyway). Removes the "invalidate inodes" loop
from GFS2's put_super routine. This is done in kill super anyway so
we don't need to do it here. The loop was also bogus in that if there
are any inodes "stuck" at this point its a bug and we need to know
about it rather than hide it by hanging forever.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index d9334eb72df8..d180c89dd567 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c | |||
@@ -45,7 +45,7 @@ static void meta_go_sync(struct gfs2_glock *gl, int flags) | |||
45 | return; | 45 | return; |
46 | 46 | ||
47 | if (test_and_clear_bit(GLF_DIRTY, &gl->gl_flags)) { | 47 | if (test_and_clear_bit(GLF_DIRTY, &gl->gl_flags)) { |
48 | gfs2_log_flush_glock(gl); | 48 | gfs2_log_flush(gl->gl_sbd, gl); |
49 | gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT); | 49 | gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT); |
50 | if (flags & DIO_RELEASE) | 50 | if (flags & DIO_RELEASE) |
51 | gfs2_ail_empty_gl(gl); | 51 | gfs2_ail_empty_gl(gl); |
@@ -149,12 +149,12 @@ static void inode_go_sync(struct gfs2_glock *gl, int flags) | |||
149 | if (test_bit(GLF_DIRTY, &gl->gl_flags)) { | 149 | if (test_bit(GLF_DIRTY, &gl->gl_flags)) { |
150 | if (meta && data) { | 150 | if (meta && data) { |
151 | gfs2_page_sync(gl, flags | DIO_START); | 151 | gfs2_page_sync(gl, flags | DIO_START); |
152 | gfs2_log_flush_glock(gl); | 152 | gfs2_log_flush(gl->gl_sbd, gl); |
153 | gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT); | 153 | gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT); |
154 | gfs2_page_sync(gl, flags | DIO_WAIT); | 154 | gfs2_page_sync(gl, flags | DIO_WAIT); |
155 | clear_bit(GLF_DIRTY, &gl->gl_flags); | 155 | clear_bit(GLF_DIRTY, &gl->gl_flags); |
156 | } else if (meta) { | 156 | } else if (meta) { |
157 | gfs2_log_flush_glock(gl); | 157 | gfs2_log_flush(gl->gl_sbd, gl); |
158 | gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT); | 158 | gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT); |
159 | } else if (data) | 159 | } else if (data) |
160 | gfs2_page_sync(gl, flags | DIO_START | DIO_WAIT); | 160 | gfs2_page_sync(gl, flags | DIO_START | DIO_WAIT); |