Commit c3f60b6e authored by Bob Peterson's avatar Bob Peterson Committed by Steven Whitehouse

[GFS2] Eliminate the no longer needed sd_statfs_mutex

This patch eliminates the unneeded sd_statfs_mutex mutex but preserves
the ordering as discussed.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent b3513fca
...@@ -529,7 +529,6 @@ struct gfs2_sbd { ...@@ -529,7 +529,6 @@ struct gfs2_sbd {
/* StatFS stuff */ /* StatFS stuff */
spinlock_t sd_statfs_spin; 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_master;
struct gfs2_statfs_change_host sd_statfs_local; struct gfs2_statfs_change_host sd_statfs_local;
unsigned long sd_statfs_sync_time; unsigned long sd_statfs_sync_time;
......
...@@ -60,7 +60,6 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) ...@@ -60,7 +60,6 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
mutex_init(&sdp->sd_inum_mutex); mutex_init(&sdp->sd_inum_mutex);
spin_lock_init(&sdp->sd_statfs_spin); spin_lock_init(&sdp->sd_statfs_spin);
mutex_init(&sdp->sd_statfs_mutex);
spin_lock_init(&sdp->sd_rindex_spin); spin_lock_init(&sdp->sd_rindex_spin);
mutex_init(&sdp->sd_rindex_mutex); mutex_init(&sdp->sd_rindex_mutex);
......
...@@ -688,9 +688,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free, ...@@ -688,9 +688,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
if (error) if (error)
return; return;
mutex_lock(&sdp->sd_statfs_mutex);
gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
mutex_unlock(&sdp->sd_statfs_mutex);
spin_lock(&sdp->sd_statfs_spin); spin_lock(&sdp->sd_statfs_spin);
l_sc->sc_total += total; l_sc->sc_total += total;
...@@ -738,9 +736,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp) ...@@ -738,9 +736,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp)
if (error) if (error)
goto out_bh2; goto out_bh2;
mutex_lock(&sdp->sd_statfs_mutex);
gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1);
mutex_unlock(&sdp->sd_statfs_mutex);
spin_lock(&sdp->sd_statfs_spin); spin_lock(&sdp->sd_statfs_spin);
m_sc->sc_total += l_sc->sc_total; m_sc->sc_total += l_sc->sc_total;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment