summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2008-01-28 23:54:16 +0300
committerSteven Whitehouse <swhiteho@redhat.com>2008-03-31 13:40:00 +0400
commitef8c441cb7fece75dbbdb1f59d3f82b6a4be7474 (patch)
tree2319b22825ccf910040fbbb99d88788ff4638708 /fs/gfs2
parent7eabb77e65c559d9c284da232b9ba5354898028a (diff)
downloadlinux-ef8c441cb7fece75dbbdb1f59d3f82b6a4be7474.tar.xz
[GFS2] Only wake the reclaim daemon if we need to
This patch only wakes up the glock reclaim daemon if there is actually something to be reclaimed. 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 7175a4d06435..5752dec017c1 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1594,10 +1594,10 @@ void gfs2_glock_schedule_for_reclaim(struct gfs2_glock *gl)
gfs2_glock_hold(gl);
list_add(&gl->gl_reclaim, &sdp->sd_reclaim_list);
atomic_inc(&sdp->sd_reclaim_count);
- }
- spin_unlock(&sdp->sd_reclaim_lock);
-
- wake_up(&sdp->sd_reclaim_wq);
+ spin_unlock(&sdp->sd_reclaim_lock);
+ wake_up(&sdp->sd_reclaim_wq);
+ } else
+ spin_unlock(&sdp->sd_reclaim_lock);
}
/**