Skip to content

Commit

Permalink
GFS2: Combine functions gfs2_glock_dq_wait and wait_on_demote
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Sep 24, 2012
1 parent 07a7904 commit 81e1d45
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,6 @@ int gfs2_glock_wait(struct gfs2_holder *gh)
return gh->gh_error;
}

static void wait_on_demote(struct gfs2_glock *gl)
{
might_sleep();
wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, TASK_UNINTERRUPTIBLE);
}

/**
* handle_callback - process a demote request
* @gl: the glock
Expand Down Expand Up @@ -1123,7 +1117,8 @@ void gfs2_glock_dq_wait(struct gfs2_holder *gh)
{
struct gfs2_glock *gl = gh->gh_gl;
gfs2_glock_dq(gh);
wait_on_demote(gl);
might_sleep();
wait_on_bit(&gl->gl_flags, GLF_DEMOTE, gfs2_glock_demote_wait, TASK_UNINTERRUPTIBLE);
}

/**
Expand Down

0 comments on commit 81e1d45

Please sign in to comment.