From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx192.postini.com [74.125.245.192]) by kanga.kvack.org (Postfix) with SMTP id 8979C6B005D for ; Wed, 4 Jan 2012 12:24:43 -0500 (EST) From: Leonid Moiseichuk Subject: [PATCH 3.2.0-rc1 1/3] Making si_swapinfo exportable Date: Wed, 4 Jan 2012 19:21:54 +0200 Message-Id: <58b74a5014e323cebeb4d3654f7f8a18c2f8d132.1325696593.git.leonid.moiseichuk@nokia.com> In-Reply-To: In-Reply-To: References: References: Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: cesarb@cesarb.net, kamezawa.hiroyu@jp.fujitsu.com, emunson@mgebm.net, penberg@kernel.org, aarcange@redhat.com, riel@redhat.com, mel@csn.ul.ie, rientjes@google.com, dima@android.com, gregkh@suse.de, rebecca@android.com, san@google.com, akpm@linux-foundation.org, vesa.jaaskelainen@nokia.com 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 --- 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 #include #include #include #include +#include #include #include #include @@ -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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org