aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2012-08-09 13:48:43 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-09-24 05:47:07 -0400
commit4abb6ad9eae0aebfcec4f188a408447cc4ea1cb4 (patch)
tree2619829db55572465ada6374ec3dddbb96c94c96 /fs/gfs2
parent8e711e100fd63b9cbf095030d45fd5ee2fa4c995 (diff)
GFS2: inline __gfs2_glock_schedule_for_reclaim
Since function gfs2_glock_schedule_for_reclaim is only two significant lines, we can eliminate it, simplifying the code and making it more readable. 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.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 1ed81f40da0d..67f3e42d4bd2 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -186,20 +186,6 @@ static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl)
186} 186}
187 187
188/** 188/**
189 * __gfs2_glock_schedule_for_reclaim - Add a glock to the reclaim list
190 * @gl: the glock
191 *
192 * If the glock is demotable, then we add it (or move it) to the end
193 * of the glock LRU list.
194 */
195
196static void __gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl)
197{
198 if (demote_ok(gl))
199 gfs2_glock_add_to_lru(gl);
200}
201
202/**
203 * gfs2_glock_put_nolock() - Decrement reference count on glock 189 * gfs2_glock_put_nolock() - Decrement reference count on glock
204 * @gl: The glock to put 190 * @gl: The glock to put
205 * 191 *
@@ -1121,8 +1107,9 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
1121 !test_bit(GLF_DEMOTE, &gl->gl_flags)) 1107 !test_bit(GLF_DEMOTE, &gl->gl_flags))
1122 fast_path = 1; 1108 fast_path = 1;
1123 } 1109 }
1124 if (!test_bit(GLF_LFLUSH, &gl->gl_flags)) 1110 if (!test_bit(GLF_LFLUSH, &gl->gl_flags) && demote_ok(gl))
1125 __gfs2_glock_schedule_for_reclaim(gl); 1111 gfs2_glock_add_to_lru(gl);
1112
1126 trace_gfs2_glock_queue(gh, 0); 1113 trace_gfs2_glock_queue(gh, 0);
1127 spin_unlock(&gl->gl_spin); 1114 spin_unlock(&gl->gl_spin);
1128 if (likely(fast_path)) 1115 if (likely(fast_path))