]> Git Repo - linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
authorLinus Torvalds <[email protected]>
Wed, 8 Jun 2011 01:44:10 +0000 (18:44 -0700)
committerLinus Torvalds <[email protected]>
Wed, 8 Jun 2011 01:44:10 +0000 (18:44 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: Processes waiting on inode glock that no processes are holding

1  2 
fs/gfs2/glock.c

diff --combined fs/gfs2/glock.c
index 2792a790e50ba9ae2eae255eccc68e47f39d9501,7137750f17f0f99002bed8375f4bcdc3ea66767a..1c1336e7b3b222d347f657fa2895ddc1c2f05c65
@@@ -663,14 -663,19 +663,19 @@@ static void glock_work_func(struct work
                drop_ref = 1;
        }
        spin_lock(&gl->gl_spin);
-       if (test_and_clear_bit(GLF_PENDING_DEMOTE, &gl->gl_flags) &&
+       if (test_bit(GLF_PENDING_DEMOTE, &gl->gl_flags) &&
            gl->gl_state != LM_ST_UNLOCKED &&
            gl->gl_demote_state != LM_ST_EXCLUSIVE) {
                unsigned long holdtime, now = jiffies;
                holdtime = gl->gl_tchange + gl->gl_ops->go_min_hold_time;
                if (time_before(now, holdtime))
                        delay = holdtime - now;
-               set_bit(delay ? GLF_PENDING_DEMOTE : GLF_DEMOTE, &gl->gl_flags);
+               if (!delay) {
+                       clear_bit(GLF_PENDING_DEMOTE, &gl->gl_flags);
+                       set_bit(GLF_DEMOTE, &gl->gl_flags);
+               }
        }
        run_queue(gl, 0);
        spin_unlock(&gl->gl_spin);
@@@ -1346,14 -1351,11 +1351,14 @@@ void gfs2_glock_complete(struct gfs2_gl
  }
  
  
 -static int gfs2_shrink_glock_memory(struct shrinker *shrink, int nr, gfp_t gfp_mask)
 +static int gfs2_shrink_glock_memory(struct shrinker *shrink,
 +                                  struct shrink_control *sc)
  {
        struct gfs2_glock *gl;
        int may_demote;
        int nr_skipped = 0;
 +      int nr = sc->nr_to_scan;
 +      gfp_t gfp_mask = sc->gfp_mask;
        LIST_HEAD(skipped);
  
        if (nr == 0)
This page took 0.069924 seconds and 4 git commands to generate.