]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Fix glock deallocation race
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 9 Mar 2011 10:58:04 +0000 (10:58 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 9 Mar 2011 10:58:04 +0000 (10:58 +0000)
commitb67c68bec2817305196974c4d5d5e509abc7a408
tree8b0a89a0de01a0504a002a184a290a53545fce82
parent650fe4fec0127dd023cfb306504727ab533fc935
GFS2: Fix glock deallocation race

This patch fixes a race in deallocating glocks which was introduced
in the RCU glock patch. We need to ensure that the glock count is
kept correct even in the case that there is a race to add a new
glock into the hash table. Also, to avoid having to wait for an
RCU grace period, the glock counter can be decremented before
call_rcu() is called.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glock.c
fs/gfs2/glock.h
fs/gfs2/lock_dlm.c
fs/gfs2/ops_fstype.c