diff options
author | Alex Shi <alex.shi@linaro.org> | 2015-05-21 10:02:25 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2015-05-21 10:02:25 +0800 |
commit | baf41996d83a6ecd270be42ca1870592827fb30d (patch) | |
tree | fd59f83bdadfc43ed9b18b4ef5dc5f01f715d1fd /fs/ocfs2 | |
parent | 8a95b5736641a5cd3996e4fe4c0af6ea05cfa86c (diff) | |
parent | b5bac1f597ae5669dee0d2ae927b8ded0b8f6b34 (diff) |
Merge tag 'v3.10.79' into linux-linaro-lsk-v3.10
This is the 3.10.79 stable release
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 2b941113e423..2c119d5d04c9 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -729,6 +729,19 @@ lookup: if (tmpres) { spin_unlock(&dlm->spinlock); spin_lock(&tmpres->spinlock); + + /* + * Right after dlm spinlock was released, dlm_thread could have + * purged the lockres. Check if lockres got unhashed. If so + * start over. + */ + if (hlist_unhashed(&tmpres->hash_node)) { + spin_unlock(&tmpres->spinlock); + dlm_lockres_put(tmpres); + tmpres = NULL; + goto lookup; + } + /* Wait on the thread that is mastering the resource */ if (tmpres->owner == DLM_LOCK_RES_OWNER_UNKNOWN) { __dlm_wait_on_lockres(tmpres); |