GFS2: Only wait for demote when last holder is dequeued
authorBob Peterson <rpeterso@redhat.com>
Fri, 20 Jun 2014 13:36:41 +0000 (09:36 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 18 Jul 2014 10:12:14 +0000 (11:12 +0100)
commit79272b3562bb44ce7dc720cd13136f5a4a53c618
tree7339b1d87039d77346d9a4ec3fb2be3316c6be81
parent3c8fb50445833b93f69b6b703a29aae3523cad0c
GFS2: Only wait for demote when last holder is dequeued

Function gfs2_glock_dq_wait is supposed to dequeue a glock and then
wait for the lock to be demoted. The problem is, if this is a shared
lock, its demote will depend on the other holders, which means you
might end up waiting forever because the other process is blocked.
This problem is especially apparent when dealing with nested flocks.

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