From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Thu, 3 Dec 2020 08:49:55 -0500 (EST) Subject: [Cluster-devel] [GFS2 PATCH] gfs2: Remove sb_start_write from gfs2_statfs_sync In-Reply-To: <1532030071.31309682.1607003348976.JavaMail.zimbra@redhat.com> Message-ID: <1955990783.31309994.1607003395266.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Before this patch, function gfs2_statfs_sync called sb_start_write and sb_end_write. This is completely unnecessary because, aside from grabbing glocks, gfs2_statfs_sync does all its updates to statfs with a transaction: gfs2_trans_begin and _end. And transactions always do sb_start_intwrite in gfs2_trans_begin and sb_end_intwrite in gfs2_trans_end. This patch simply removes the call to sb_start_write. Signed-off-by: Bob Peterson --- fs/gfs2/super.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index b3d951ab8068..2f56acc41c04 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -353,7 +353,6 @@ int gfs2_statfs_sync(struct super_block *sb, int type) struct buffer_head *m_bh, *l_bh; int error; - sb_start_write(sb); error = gfs2_glock_nq_init(m_ip->i_gl, LM_ST_EXCLUSIVE, GL_NOCACHE, &gh); if (error) @@ -392,7 +391,6 @@ int gfs2_statfs_sync(struct super_block *sb, int type) out_unlock: gfs2_glock_dq_uninit(&gh); out: - sb_end_write(sb); return error; }