]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Fix glock refcount issues
authorSteven Whitehouse <swhiteho@redhat.com>
Fri, 27 Nov 2009 10:31:11 +0000 (10:31 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 3 Dec 2009 12:00:12 +0000 (12:00 +0000)
commit54b29cb74bf83b80610ae602f675def812ca0b26
tree0fcdf84b70a9effe7ab9c661dca74b6a4b4afb31
parent8d7b56c0d90f4de74216e5282c25f46637129ac4
GFS2: Fix glock refcount issues

This patch fixes some ref counting issues. Firstly by moving
the point at which we drop the ref count after a dlm lock
operation has completed we ensure that we never call
gfs2_glock_hold() on a lock with a zero ref count.

Secondly, by using atomic_dec_and_lock() in gfs2_glock_put()
we ensure that at no time will a glock with zero ref count
appear on the lru_list. That means that we can remove the
check for this in our shrinker (which was racy).

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