gfs2: Remove sb_start_write from gfs2_statfs_sync
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 <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>pull/712/merge
parent
28c332b941
commit
dd64fe8167
|
|
@ -353,7 +353,6 @@ int gfs2_statfs_sync(struct super_block *sb, int type)
|
||||||
struct buffer_head *m_bh, *l_bh;
|
struct buffer_head *m_bh, *l_bh;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
sb_start_write(sb);
|
|
||||||
error = gfs2_glock_nq_init(m_ip->i_gl, LM_ST_EXCLUSIVE, GL_NOCACHE,
|
error = gfs2_glock_nq_init(m_ip->i_gl, LM_ST_EXCLUSIVE, GL_NOCACHE,
|
||||||
&gh);
|
&gh);
|
||||||
if (error)
|
if (error)
|
||||||
|
|
@ -392,7 +391,6 @@ out_bh:
|
||||||
out_unlock:
|
out_unlock:
|
||||||
gfs2_glock_dq_uninit(&gh);
|
gfs2_glock_dq_uninit(&gh);
|
||||||
out:
|
out:
|
||||||
sb_end_write(sb);
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue