diff options
Diffstat (limited to 'fs/gfs2/lock_dlm.c')
-rw-r--r-- | fs/gfs2/lock_dlm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index f8411bd1b805..5f5e70e047dc 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -200,10 +200,11 @@ static int make_mode(const unsigned int lmstate) | |||
200 | return -1; | 200 | return -1; |
201 | } | 201 | } |
202 | 202 | ||
203 | static u32 make_flags(const u32 lkid, const unsigned int gfs_flags, | 203 | static u32 make_flags(struct gfs2_glock *gl, const unsigned int gfs_flags, |
204 | const int req) | 204 | const int req) |
205 | { | 205 | { |
206 | u32 lkf = DLM_LKF_VALBLK; | 206 | u32 lkf = DLM_LKF_VALBLK; |
207 | u32 lkid = gl->gl_lksb.sb_lkid; | ||
207 | 208 | ||
208 | if (gfs_flags & LM_FLAG_TRY) | 209 | if (gfs_flags & LM_FLAG_TRY) |
209 | lkf |= DLM_LKF_NOQUEUE; | 210 | lkf |= DLM_LKF_NOQUEUE; |
@@ -227,8 +228,11 @@ static u32 make_flags(const u32 lkid, const unsigned int gfs_flags, | |||
227 | BUG(); | 228 | BUG(); |
228 | } | 229 | } |
229 | 230 | ||
230 | if (lkid != 0) | 231 | if (lkid != 0) { |
231 | lkf |= DLM_LKF_CONVERT; | 232 | lkf |= DLM_LKF_CONVERT; |
233 | if (test_bit(GLF_BLOCKING, &gl->gl_flags)) | ||
234 | lkf |= DLM_LKF_QUECVT; | ||
235 | } | ||
232 | 236 | ||
233 | return lkf; | 237 | return lkf; |
234 | } | 238 | } |
@@ -250,7 +254,7 @@ static int gdlm_lock(struct gfs2_glock *gl, unsigned int req_state, | |||
250 | char strname[GDLM_STRNAME_BYTES] = ""; | 254 | char strname[GDLM_STRNAME_BYTES] = ""; |
251 | 255 | ||
252 | req = make_mode(req_state); | 256 | req = make_mode(req_state); |
253 | lkf = make_flags(gl->gl_lksb.sb_lkid, flags, req); | 257 | lkf = make_flags(gl, flags, req); |
254 | gfs2_glstats_inc(gl, GFS2_LKS_DCOUNT); | 258 | gfs2_glstats_inc(gl, GFS2_LKS_DCOUNT); |
255 | gfs2_sbstats_inc(gl, GFS2_LKS_DCOUNT); | 259 | gfs2_sbstats_inc(gl, GFS2_LKS_DCOUNT); |
256 | if (gl->gl_lksb.sb_lkid) { | 260 | if (gl->gl_lksb.sb_lkid) { |