diff options
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/glock.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index cd0aa213fb2..13391e54661 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -267,8 +267,12 @@ static inline int may_grant(const struct gfs2_glock *gl, const struct gfs2_holde | |||
267 | return 1; | 267 | return 1; |
268 | if (gh->gh_flags & GL_EXACT) | 268 | if (gh->gh_flags & GL_EXACT) |
269 | return 0; | 269 | return 0; |
270 | if (gh->gh_state == LM_ST_SHARED && gl->gl_state == LM_ST_EXCLUSIVE) | 270 | if (gl->gl_state == LM_ST_EXCLUSIVE) { |
271 | return 1; | 271 | if (gh->gh_state == LM_ST_SHARED && gh_head->gh_state == LM_ST_SHARED) |
272 | return 1; | ||
273 | if (gh->gh_state == LM_ST_DEFERRED && gh_head->gh_state == LM_ST_DEFERRED) | ||
274 | return 1; | ||
275 | } | ||
272 | if (gl->gl_state != LM_ST_UNLOCKED && (gh->gh_flags & LM_FLAG_ANY)) | 276 | if (gl->gl_state != LM_ST_UNLOCKED && (gh->gh_flags & LM_FLAG_ANY)) |
273 | return 1; | 277 | return 1; |
274 | return 0; | 278 | return 0; |