Skip to content

Commit

Permalink
[GFS2] Only wake the reclaim daemon if we need to
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Mar 31, 2008
1 parent 7eabb77 commit ef8c441
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit ef8c441

Please sign in to comment.