]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Update master statfs buffer with sd_statfs_spin locked
authorBob Peterson <rpeterso@redhat.com>
Wed, 11 Mar 2015 14:52:31 +0000 (09:52 -0500)
committerBob Peterson <rpeterso@redhat.com>
Mon, 14 Dec 2015 18:19:28 +0000 (12:19 -0600)
commit0e7c648d9bf80848d9324e7646c0afd26ee4ae35
tree3142102b533bcab238ea38be2bf272f90575da75
parenta401420f356cb80e3ec9348bf7ffe36f698a0e66
GFS2: Update master statfs buffer with sd_statfs_spin locked

Before this patch, function update_statfs called gfs2_statfs_change_out
to update the master statfs buffer without the sd_statfs_spin held.
In theory, another process could call gfs2_statfs_sync, which takes
the sd_statfs_spin lock and re-reads m_sc from the buffer. So there's
a theoretical timing window in which one process could write the
master statfs buffer, then another comes along and re-reads it, wiping
out the changes.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/super.c