gfs2: gfs2_glock_get: Wait on freeing glocks
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 1 Aug 2017 16:18:26 +0000 (11:18 -0500)
committerBob Peterson <rpeterso@redhat.com>
Thu, 10 Aug 2017 15:39:31 +0000 (10:39 -0500)
commit0515480ad424f2d6853ffe448f444ba3c756c057
treef7a9d9d952c4cafc36e41f517086f0599b564d31
parent61b91cfdc6c0c49a8cc8258cbee846551029d694
gfs2: gfs2_glock_get: Wait on freeing glocks

Keep glocks in their hash table until they are freed instead of removing
them when their last reference is dropped.  This allows to wait for any
previous instances of a glock to go away in gfs2_glock_get before
creating a new glocks.

Special thanks to Andy Price for finding and fixing a problem which also
required us to delete the rcu_read_unlock from the error case in function
gfs2_glock_get.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/glock.c