mm-move-page-writeback-sysctls-to-is-own-file-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 16 Feb 2022 04:31:06 +0000 (15:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 16 Feb 2022 04:31:06 +0000 (15:31 +1100)
fix CONFIG_SYSCTL=n warnings

Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: zhanglianjie <zhanglianjie@uniontech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/page-writeback.c

index 1b308c00908c7a3606599e2e526b95e199f7ade9..48a8cf770e3f49f894ee1148232cefe73832646a 100644 (file)
@@ -506,6 +506,7 @@ bool node_dirty_ok(struct pglist_data *pgdat)
        return nr_pages <= limit;
 }
 
+#ifdef CONFIG_SYSCTL
 static int dirty_background_ratio_handler(struct ctl_table *table, int write,
                void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -555,6 +556,7 @@ static int dirty_bytes_handler(struct ctl_table *table, int write,
        }
        return ret;
 }
+#endif
 
 static unsigned long wp_next_time(unsigned long cur_time)
 {
@@ -1996,6 +1998,7 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb)
        return false;
 }
 
+#ifdef CONFIG_SYSCTL
 /*
  * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs
  */
@@ -2020,6 +2023,7 @@ static int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
 
        return ret;
 }
+#endif
 
 void laptop_mode_timer_fn(struct timer_list *t)
 {