aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2012-08-09 13:48:45 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-09-24 05:47:10 -0400
commit81e1d45061d09f296d7664af70d3334840d123a0 (patch)
tree0ecb235ad73de100e81d3b20a1b08a44b827a1d8 /fs/gfs2
parent07a790494260e102eb42840537af82e84d2ab766 (diff)
GFS2: Combine functions gfs2_glock_dq_wait and wait_on_demote
Function gfs2_glock_dq_wait called two-line function wait_on_demote, so they were combined. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/glock.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 5c8790960735..fca6a873dcf3 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -890,12 +890,6 @@ int gfs2_glock_wait(struct gfs2_holder *gh)
890 return gh->gh_error; 890 return gh->gh_error;
891} 891}
892 892
893static void wait_on_demote(struct gfs2_glock *gl)
894{
895 might_sleep();
896 wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, TASK_UNINTERRUPTIBLE);
897}
898
899/** 893/**
900 * handle_callback - process a demote request 894 * handle_callback - process a demote request
901 * @gl: the glock 895 * @gl: the glock
@@ -1123,7 +1117,8 @@ void gfs2_glock_dq_wait(struct gfs2_holder *gh)
1123{ 1117{
1124 struct gfs2_glock *gl = gh->gh_gl; 1118 struct gfs2_glock *gl = gh->gh_gl;
1125 gfs2_glock_dq(gh); 1119 gfs2_glock_dq(gh);
1126 wait_on_demote(gl); 1120 might_sleep();
1121 wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, TASK_UNINTERRUPTIBLE);
1127} 1122}
1128 1123
1129/** 1124/**