diff options
-rw-r--r-- | fs/gfs2/file.c | 2 | ||||
-rw-r--r-- | fs/gfs2/glock.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 4fc3a3046174..491e8e023598 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -991,7 +991,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl) | |||
991 | goto out; | 991 | goto out; |
992 | flock_lock_file_wait(file, | 992 | flock_lock_file_wait(file, |
993 | &(struct file_lock){.fl_type = F_UNLCK}); | 993 | &(struct file_lock){.fl_type = F_UNLCK}); |
994 | gfs2_glock_dq_wait(fl_gh); | 994 | gfs2_glock_dq(fl_gh); |
995 | gfs2_holder_reinit(state, flags, fl_gh); | 995 | gfs2_holder_reinit(state, flags, fl_gh); |
996 | } else { | 996 | } else { |
997 | error = gfs2_glock_get(GFS2_SB(&ip->i_inode), ip->i_no_addr, | 997 | error = gfs2_glock_get(GFS2_SB(&ip->i_inode), ip->i_no_addr, |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index b703dcc91588..ee4e04fe60fc 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -1128,9 +1128,7 @@ 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 | if (!find_first_holder(gl)) | 1131 | wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, TASK_UNINTERRUPTIBLE); |
1132 | wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, | ||
1133 | TASK_UNINTERRUPTIBLE); | ||
1134 | } | 1132 | } |
1135 | 1133 | ||
1136 | /** | 1134 | /** |