]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Fix race during filesystem mount
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 11 Jul 2011 07:53:30 +0000 (08:53 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 12 Jul 2011 08:15:46 +0000 (09:15 +0100)
commitf0aee7053acb443dd5ae9893abcea226eccaeaf4
treecc9eee61c37d18e1887f0723d338b121561dc0b9
parent22a6864997cbb6972b2f3831d621da9bbbfd1afe
GFS2: Fix race during filesystem mount

There is a potential race during filesystem mounting which has recently
been reported. It occurs when the userland gfs_controld is able to
process requests fast enough that it tries to use the sysfs interface
before the lock module is properly initialised. This is a pretty
unusual case as normally the lock module initialisation is very quick
compared with gfs_controld.

This patch adds an interruptible completion which is used to ensure that
userland will wait for the initialisation of the lock module to
complete.

There are other potential solutions to this problem, but this is the
quickest at this stage and has been tested both with and without
mount.gfs2 present in the system.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reported-by: David Booher <dbooher@adams.net>
fs/gfs2/incore.h
fs/gfs2/ops_fstype.c
fs/gfs2/sys.c