On Wed, 2007-12-12 at 15:56 +0000, Steven Whitehouse wrote:
> I don't see why it needs to be "protected", I think that mutex is just a
> bug in that case unless you can prove otherwise... it seems to be doing
> nothing,
>
> Steve.
Hi,
In that case, here is my revision:
Regards,
Bob Peterson
--
fs/gfs2/super.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -686,8 +686,9 @@ void gfs2_statfs_change(struct gfs2_sbd
if (error)
return;
- spin_lock(&sdp->sd_statfs_spin);
gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
+
+ spin_lock(&sdp->sd_statfs_spin);
l_sc->sc_total += total;
l_sc->sc_free += free;
l_sc->sc_dinodes += dinodes;
@@ -733,8 +734,9 @@ int gfs2_statfs_sync(struct gfs2_sbd *sd
if (error)
goto out_bh2;
- spin_lock(&sdp->sd_statfs_spin);
gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
+
+ spin_lock(&sdp->sd_statfs_spin);
m_sc->sc_total += l_sc->sc_total;
m_sc->sc_free += l_sc->sc_free;
m_sc->sc_dinodes += l_sc->sc_dinodes;