lkml.org 
[lkml]   [2010]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/2] vmscan: change shrink_slab() return tyep with void
    Date
    Now, no caller use the return value of shrink_slab(). Thus we can change
    it with void.

    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    ---
    mm/vmscan.c | 7 +++----
    1 files changed, 3 insertions(+), 4 deletions(-)

    diff --git a/mm/vmscan.c b/mm/vmscan.c
    index bfa1975..89b593e 100644
    --- a/mm/vmscan.c
    +++ b/mm/vmscan.c
    @@ -277,24 +277,23 @@ EXPORT_SYMBOL(shrinker_do_scan);
    *
    * Returns the number of slab objects which we shrunk.
    */
    -static unsigned long shrink_slab(struct zone *zone, unsigned long scanned, unsigned long total,
    +static void shrink_slab(struct zone *zone, unsigned long scanned, unsigned long total,
    unsigned long global, gfp_t gfp_mask)
    {
    struct shrinker *shrinker;
    - unsigned long ret = 0;

    if (scanned == 0)
    scanned = SWAP_CLUSTER_MAX;

    if (!down_read_trylock(&shrinker_rwsem))
    - return 1; /* Assume we'll be able to shrink next time */
    + return;

    list_for_each_entry(shrinker, &shrinker_list, list) {
    (*shrinker->shrink)(shrinker, zone, scanned,
    total, global, gfp_mask);
    }
    up_read(&shrinker_rwsem);
    - return ret;
    + return;
    }

    void shrink_all_slab(void)
    --
    1.6.5.2




    \
     
     \ /
      Last update: 2010-07-24 10:49    [W:0.020 / U:20.508 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site