Skip to contentSkip to conversation

corrected

PATCH New Bob Peterson 2 participants 2 messages Dec 12, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 4/10 corrected

Hi,

This patch eliminates the unneeded sd_statfs_mutex mutex but preserves the ordering as discussed.

Regards,

Bob Peterson
Red Hat GFS

--

 fs/gfs2/incore.h     |    1 -
 fs/gfs2/ops_fstype.c |    1 -
 fs/gfs2/super.c      |    4 ----
 3 files changed, 0 insertions(+), 6 deletions(-)
fs/gfs2/incore.h +0 -1
index 8ab0563..c9f4637 100644
@@ -564,7 +564,6 @@ struct gfs2_sbd {
 	/* StatFS stuff */
 
 	spinlock_t sd_statfs_spin;
-	struct mutex sd_statfs_mutex;
 	struct gfs2_statfs_change_host sd_statfs_master;
 	struct gfs2_statfs_change_host sd_statfs_local;
 	unsigned long sd_statfs_sync_time;
fs/gfs2/ops_fstype.c +0 -1
index 5558fdf..6a2ef0d 100644
@@ -61,7 +61,6 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
 
 	mutex_init(&sdp->sd_inum_mutex);
 	spin_lock_init(&sdp->sd_statfs_spin);
-	mutex_init(&sdp->sd_statfs_mutex);
 
 	spin_lock_init(&sdp->sd_rindex_spin);
 	mutex_init(&sdp->sd_rindex_mutex);
fs/gfs2/super.c +0 -4
index dda7747..73e49df 100644
@@ -686,9 +686,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
 	if (error)
 		return;
 
-	mutex_lock(&sdp->sd_statfs_mutex);
 	gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
-	mutex_unlock(&sdp->sd_statfs_mutex);
 
 	spin_lock(&sdp->sd_statfs_spin);
 	l_sc->sc_total += total;
@@ -736,9 +734,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp)
 	if (error)
 		goto out_bh2;
 
-	mutex_lock(&sdp->sd_statfs_mutex);
 	gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
-	mutex_unlock(&sdp->sd_statfs_mutex);
 
 	spin_lock(&sdp->sd_statfs_spin);
 	m_sc->sc_total += l_sc->sc_total;
#1 lore raw

PATCH 4/10 corrected

Hi,

Thanks, now in the -nmw git tree. Thanks,

Steve.

Quoted 67 lines · Bob Peterson

Hi,

This patch eliminates the unneeded sd_statfs_mutex mutex but preserves the ordering as discussed.

Regards,

Bob Peterson
Red Hat GFS

--

 fs/gfs2/incore.h     |    1 -
 fs/gfs2/ops_fstype.c |    1 -
 fs/gfs2/super.c      |    4 ----
 3 files changed, 0 insertions(+), 6 deletions(-)
fs/gfs2/incore.h +0 -1
index 8ab0563..c9f4637 100644
@@ -564,7 +564,6 @@ struct gfs2_sbd {
 	/* StatFS stuff */
 
 	spinlock_t sd_statfs_spin;
-	struct mutex sd_statfs_mutex;
 	struct gfs2_statfs_change_host sd_statfs_master;
 	struct gfs2_statfs_change_host sd_statfs_local;
 	unsigned long sd_statfs_sync_time;
fs/gfs2/ops_fstype.c +0 -1
index 5558fdf..6a2ef0d 100644
@@ -61,7 +61,6 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
 
 	mutex_init(&sdp->sd_inum_mutex);
 	spin_lock_init(&sdp->sd_statfs_spin);
-	mutex_init(&sdp->sd_statfs_mutex);
 
 	spin_lock_init(&sdp->sd_rindex_spin);
 	mutex_init(&sdp->sd_rindex_mutex);
fs/gfs2/super.c +0 -4
index dda7747..73e49df 100644
@@ -686,9 +686,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
 	if (error)
 		return;
 
-	mutex_lock(&sdp->sd_statfs_mutex);
 	gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
-	mutex_unlock(&sdp->sd_statfs_mutex);
 
 	spin_lock(&sdp->sd_statfs_spin);
 	l_sc->sc_total += total;
@@ -736,9 +734,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp)
 	if (error)
 		goto out_bh2;
 
-	mutex_lock(&sdp->sd_statfs_mutex);
 	gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
-	mutex_unlock(&sdp->sd_statfs_mutex);
 
 	spin_lock(&sdp->sd_statfs_spin);
 	m_sc->sc_total += l_sc->sc_total;