diff options
-rw-r--r-- | fs/gfs2/glock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index c355f7320e44..278fae5b6982 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -1128,7 +1128,9 @@ void gfs2_glock_dq_wait(struct gfs2_holder *gh) | |||
1128 | struct gfs2_glock *gl = gh->gh_gl; | 1128 | struct gfs2_glock *gl = gh->gh_gl; |
1129 | gfs2_glock_dq(gh); | 1129 | gfs2_glock_dq(gh); |
1130 | might_sleep(); | 1130 | might_sleep(); |
1131 | wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, TASK_UNINTERRUPTIBLE); | 1131 | if (!find_first_holder(gl)) |
1132 | wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, | ||
1133 | TASK_UNINTERRUPTIBLE); | ||
1132 | } | 1134 | } |
1133 | 1135 | ||
1134 | /** | 1136 | /** |