]> asedeno.scripts.mit.edu Git - linux.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)
commit901c6c665b1024ea2bbabc24ba609a118459a2d8
tree3142102b533bcab238ea38be2bf272f90575da75
parentb58bf407ca4669a2dfcc00f5888ee719d9c34150
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