[GFS2] Eliminate the no longer needed sd_statfs_mutex
authorBob Peterson <rpeterso@redhat.com>
Wed, 12 Dec 2007 17:44:41 +0000 (11:44 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 25 Jan 2008 08:15:16 +0000 (08:15 +0000)
This patch eliminates the unneeded sd_statfs_mutex mutex but preserves
the ordering as discussed.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/incore.h
fs/gfs2/ops_fstype.c
fs/gfs2/super.c

index 51166c12c5d7a85ae554d797543a60fc90c0774e..350b5169a9a03099f39c0ee1bff75b2338167447 100644 (file)
@@ -529,7 +529,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;
index 0921f17a164cee9c047c35546ec21ea584893d00..79f9bb365f107794f50d46b1290f9f58d0563c86 100644 (file)
@@ -60,7 +60,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);
index 22e09660d648e65244b2c36c201672c5f2e238d0..5d0017d313a35f24d18c05baa99d4926d55f0717 100644 (file)
@@ -688,9 +688,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;
@@ -738,9 +736,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;