Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101161
b: refs/heads/master
c: 209806a
h: refs/heads/master
i:
  101159: 4628411
v: v3
  • Loading branch information
Steven Whitehouse committed Jul 7, 2008
1 parent 30b5f01 commit e7233c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 265d529cef6fd57698d79b3c0edd3a8178059ea6
refs/heads/master: 209806aba9d540dde3db0a5ce72307f85f33468f
8 changes: 6 additions & 2 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,12 @@ static inline int may_grant(const struct gfs2_glock *gl, const struct gfs2_holde
return 1;
if (gh->gh_flags & GL_EXACT)
return 0;
if (gh->gh_state == LM_ST_SHARED && gl->gl_state == LM_ST_EXCLUSIVE)
return 1;
if (gl->gl_state == LM_ST_EXCLUSIVE) {
if (gh->gh_state == LM_ST_SHARED && gh_head->gh_state == LM_ST_SHARED)
return 1;
if (gh->gh_state == LM_ST_DEFERRED && gh_head->gh_state == LM_ST_DEFERRED)
return 1;
}
if (gl->gl_state != LM_ST_UNLOCKED && (gh->gh_flags & LM_FLAG_ANY))
return 1;
return 0;
Expand Down

0 comments on commit e7233c3

Please sign in to comment.