summaryrefslogtreecommitdiff
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2022-04-16 01:08:02 +0300
committerLuis Chamberlain <mcgrof@kernel.org>2022-04-21 21:40:59 +0300
commit3c6a4cba3138d1aeeb8fd917178c6578b9b8ae29 (patch)
tree7c1e20b45da8a27e770473fd7ecbe93f49e6c669 /mm/page-writeback.c
parent988f11e046401f8561c4afefa506a50f0203de40 (diff)
downloadlinux-3c6a4cba3138d1aeeb8fd917178c6578b9b8ae29.tar.xz
mm: fix unused variable kernel warning when SYSCTL=n
When CONFIG_SYSCTL=n the variable dirty_bytes_min which is just used as a minimum to a proc handler is not used. So just move this under the ifdef for CONFIG_SYSCTL. Fixes: aa779e510219 ("mm: move page-writeback sysctls to their own file") Reported-by: kernel test robot <lkp@intel.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 438762173a59..4f51d0ac5043 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -89,9 +89,6 @@ static int vm_highmem_is_dirtyable;
*/
static int vm_dirty_ratio = 20;
-/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
-static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
-
/*
* vm_dirty_bytes starts at 0 (disabled) so that it is a function of
* vm_dirty_ratio * the amount of dirtyable memory
@@ -2077,6 +2074,10 @@ static int page_writeback_cpu_online(unsigned int cpu)
}
#ifdef CONFIG_SYSCTL
+
+/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
+static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
+
static struct ctl_table vm_page_writeback_sysctls[] = {
{
.procname = "dirty_background_ratio",