aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/glock.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 67f3e42d4bd2..5c8790960735 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -869,7 +869,14 @@ static int gfs2_glock_demote_wait(void *word)
869 return 0; 869 return 0;
870} 870}
871 871
872static void wait_on_holder(struct gfs2_holder *gh) 872/**
873 * gfs2_glock_wait - wait on a glock acquisition
874 * @gh: the glock holder
875 *
876 * Returns: 0 on success
877 */
878
879int gfs2_glock_wait(struct gfs2_holder *gh)
873{ 880{
874 unsigned long time1 = jiffies; 881 unsigned long time1 = jiffies;
875 882
@@ -880,6 +887,7 @@ static void wait_on_holder(struct gfs2_holder *gh)
880 gh->gh_gl->gl_hold_time = min(gh->gh_gl->gl_hold_time + 887 gh->gh_gl->gl_hold_time = min(gh->gh_gl->gl_hold_time +
881 GL_GLOCK_HOLD_INCR, 888 GL_GLOCK_HOLD_INCR,
882 GL_GLOCK_MAX_HOLD); 889 GL_GLOCK_MAX_HOLD);
890 return gh->gh_error;
883} 891}
884 892
885static void wait_on_demote(struct gfs2_glock *gl) 893static void wait_on_demote(struct gfs2_glock *gl)
@@ -915,19 +923,6 @@ static void handle_callback(struct gfs2_glock *gl, unsigned int state,
915 trace_gfs2_demote_rq(gl); 923 trace_gfs2_demote_rq(gl);
916} 924}
917 925
918/**
919 * gfs2_glock_wait - wait on a glock acquisition
920 * @gh: the glock holder
921 *
922 * Returns: 0 on success
923 */
924
925int gfs2_glock_wait(struct gfs2_holder *gh)
926{
927 wait_on_holder(gh);
928 return gh->gh_error;
929}
930
931void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...) 926void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...)
932{ 927{
933 struct va_format vaf; 928 struct va_format vaf;