Commit 26caee5bc643b318fa2e9bd4f66dace1755ec413

Authored by Josef Whiter
Committed by Steven Whitehouse
1 parent 87124e581b

[GFS2] Fix calculation of demote state

If a glock is in the exclusive state and a request for demote to
deferred has been received, then further requests for demote to
shared are being ignored. This patch fixes that by ensuring that
we demote to unlocked in that case.

Signed-off-by: Josef Whiter <jwhiter@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

... ... @@ -697,8 +697,9 @@
697 697 }
698 698 return;
699 699 }
700   - } else if (gl->gl_demote_state != LM_ST_UNLOCKED) {
701   - gl->gl_demote_state = state;
  700 + } else if (gl->gl_demote_state != LM_ST_UNLOCKED &&
  701 + gl->gl_demote_state != state) {
  702 + gl->gl_demote_state = LM_ST_UNLOCKED;
702 703 }
703 704 spin_unlock(&gl->gl_spin);
704 705 }