lkml.org 
[lkml]   [2012]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 1/2] Making si_swapinfo exportable
    Date
    If we will make si_swapinfo() exportable it could be called from modules.
    Otherwise modules have no interface to obtain information about swap usage.
    Change made in the same way as si_meminfo() declared.

    Signed-off-by: Leonid Moiseichuk <leonid.moiseichuk@nokia.com>
    ---
    mm/swapfile.c | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)

    diff --git a/mm/swapfile.c b/mm/swapfile.c
    index b1cd120..192cc25 100644
    --- a/mm/swapfile.c
    +++ b/mm/swapfile.c
    @@ -5,10 +5,12 @@
    * Swap reorganised 29.12.95, Stephen Tweedie
    */

    +#include <linux/export.h>
    #include <linux/mm.h>
    #include <linux/hugetlb.h>
    #include <linux/mman.h>
    #include <linux/slab.h>
    +#include <linux/kernel.h>
    #include <linux/kernel_stat.h>
    #include <linux/swap.h>
    #include <linux/vmalloc.h>
    @@ -2177,6 +2179,7 @@ void si_swapinfo(struct sysinfo *val)
    val->totalswap = total_swap_pages + nr_to_be_unused;
    spin_unlock(&swap_lock);
    }
    +EXPORT_SYMBOL(si_swapinfo);

    /*
    * Verify that a swap entry is valid and increment its swap map count.
    --
    1.7.7.3


    \
     
     \ /
      Last update: 2012-01-17 14:27    [W:0.037 / U:29.036 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site