From mboxrd@z Thu Jan 1 00:00:00 1970 From: rpeterso@redhat.com Date: Thu, 9 Aug 2012 12:48:45 -0500 Subject: [Cluster-devel] [PATCH 4/6] GFS2: Combine functions gfs2_glock_dq_wait and wait_on_demote In-Reply-To: <1344534527-28721-1-git-send-email-rpeterso@redhat.com> References: <1344534527-28721-1-git-send-email-rpeterso@redhat.com> Message-ID: <1344534527-28721-5-git-send-email-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Bob Peterson Function gfs2_glock_dq_wait called two-line function wait_on_demote, so they were combined. --- fs/gfs2/glock.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 5c87909..fca6a87 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -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 @@ -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); } /** -- 1.7.7.6