aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index b068d10bcb6e..e4da26fe406f 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -319,39 +319,6 @@ static void inode_go_unlock(struct gfs2_holder *gh)
319} 319}
320 320
321/** 321/**
322 * inode_greedy -
323 * @gl: the glock
324 *
325 */
326
327static void inode_greedy(struct gfs2_glock *gl)
328{
329 struct gfs2_sbd *sdp = gl->gl_sbd;
330 struct gfs2_inode *ip = gl->gl_object;
331 unsigned int quantum = gfs2_tune_get(sdp, gt_greedy_quantum);
332 unsigned int max = gfs2_tune_get(sdp, gt_greedy_max);
333 unsigned int new_time;
334
335 spin_lock(&ip->i_spin);
336
337 if (time_after(ip->i_last_pfault + quantum, jiffies)) {
338 new_time = ip->i_greedy + quantum;
339 if (new_time > max)
340 new_time = max;
341 } else {
342 new_time = ip->i_greedy - quantum;
343 if (!new_time || new_time > max)
344 new_time = 1;
345 }
346
347 ip->i_greedy = new_time;
348
349 spin_unlock(&ip->i_spin);
350
351 iput(&ip->i_inode);
352}
353
354/**
355 * rgrp_go_demote_ok - Check to see if it's ok to unlock a RG's glock 322 * rgrp_go_demote_ok - Check to see if it's ok to unlock a RG's glock
356 * @gl: the glock 323 * @gl: the glock
357 * 324 *
@@ -492,7 +459,6 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
492 .go_demote_ok = inode_go_demote_ok, 459 .go_demote_ok = inode_go_demote_ok,
493 .go_lock = inode_go_lock, 460 .go_lock = inode_go_lock,
494 .go_unlock = inode_go_unlock, 461 .go_unlock = inode_go_unlock,
495 .go_greedy = inode_greedy,
496 .go_type = LM_TYPE_INODE, 462 .go_type = LM_TYPE_INODE,
497}; 463};
498 464