Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26caee5bc643b318fa2e9bd4f66dace1755ec413
Commit:     26caee5bc643b318fa2e9bd4f66dace1755ec413
Parent:     87124e581bfeaa5864662a435b6ee2a19e91b905
Author:     Josef Whiter <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 10:02:40 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 08:54:42 2007 +0100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/gfs2/glock.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 6a3eeba..6b6ae45 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -697,8 +697,9 @@ static void handle_callback(struct gfs2_glock *gl, unsigned 
int state, int remot
                        }
                        return;
                }
-       } else if (gl->gl_demote_state != LM_ST_UNLOCKED) {
-               gl->gl_demote_state = state;
+       } else if (gl->gl_demote_state != LM_ST_UNLOCKED &&
+                       gl->gl_demote_state != state) {
+               gl->gl_demote_state = LM_ST_UNLOCKED;
        }
        spin_unlock(&gl->gl_spin);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to