summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/incore.h1
-rw-r--r--fs/gfs2/lock_dlm.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 980a086..399d1b9 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -203,6 +203,7 @@ struct gfs2_glock {
unsigned int gl_target;
unsigned int gl_reply;
unsigned int gl_hash;
+ unsigned int gl_req;
unsigned int gl_demote_state; /* state requested by remote node */
unsigned long gl_demote_time; /* time of first demote request */
struct list_head gl_holders;
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index a0bb7d2..46df988 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -46,11 +46,11 @@ static void gdlm_ast(void *arg)
BUG();
}
- ret = gl->gl_target;
+ ret = gl->gl_req;
if (gl->gl_lksb.sb_flags & DLM_SBF_ALTMODE) {
- if (gl->gl_target == LM_ST_SHARED)
+ if (gl->gl_req == LM_ST_SHARED)
ret = LM_ST_DEFERRED;
- else if (gl->gl_target == LM_ST_DEFERRED)
+ else if (gl->gl_req == LM_ST_DEFERRED)
ret = LM_ST_SHARED;
else
BUG();
@@ -147,6 +147,7 @@ static unsigned int gdlm_lock(struct gfs2_glock *gl,
int req;
u32 lkf;
+ gl->gl_req = req_state;
req = make_mode(req_state);
lkf = make_flags(gl->gl_lksb.sb_lkid, flags, req);
OpenPOWER on IntegriCloud