diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2014-06-23 14:43:32 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-07-18 11:12:51 +0100 |
commit | 94a09a3999ee978e097b5aad74034ed43bae56db (patch) | |
tree | 6b4331c36b3ccee82d22e62fc133f07ad060e11c /fs/block_dev.c | |
parent | 79272b3562bb44ce7dc720cd13136f5a4a53c618 (diff) |
GFS2: Fix race in glock lru glock disposal
We must not leave items on the LRU list with GLF_LOCK set, since
they can be removed if the glock is brought back into use, which
may then potentially result in a hang, waiting for GLF_LOCK to
clear.
It doesn't happen very often, since it requires a glock that has
not been used for a long time to be brought back into use at the
same moment that the shrinker is part way through disposing of
glocks.
The fix is to set GLF_LOCK at a later time, when we already know
that the other locks can be obtained. Also, we now only release
the lru_lock in case a resched is needed, rather than on every
iteration.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/block_dev.c')
0 files changed, 0 insertions, 0 deletions