Skip to contentSkip to conversation

linux-next: build failure after merge of the block tree

DISCUSSION Stephen Rothwell 3 participants 5 messages Aug 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (or32 or1ksim_defconfig) failed like this:

mm/page-writeback.c:2044:6: error: redefinition of 'laptop_sync_completion'
2044 | void laptop_sync_completion(void)

      |      ^~~~~~~~~~~~~~~~~~~~~~

In file included from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from mm/page-writeback.c:20:
include/linux/writeback.h:345:20: note: previous definition of 'laptop_sync_completion' was here
345 | static inline void laptop_sync_completion(void) { }

      |                    ^~~~~~~~~~~~~~~~~~~~~~

Caused by commit

5ed964f8e54e ("mm: hide laptop_mode_wb_timer entirely behind the BDI API")

This build does not have CONFIG_BLOCK set.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 12 lines · On Tue, 10 Aug 2021 20:31:34 +1000 Stephen Rothwell <[email protected]>…

After merging the block tree, today's linux-next build (or32 or1ksim_defconfig) failed like this:

mm/page-writeback.c:2044:6: error: redefinition of 'laptop_sync_completion'
2044 | void laptop_sync_completion(void)

      |      ^~~~~~~~~~~~~~~~~~~~~~

In file included from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from mm/page-writeback.c:20:
include/linux/writeback.h:345:20: note: previous definition of 'laptop_sync_completion' was here
345 | static inline void laptop_sync_completion(void) { }

Quoted 7 lines
      |                    ^~~~~~~~~~~~~~~~~~~~~~

Caused by commit

5ed964f8e54e ("mm: hide laptop_mode_wb_timer entirely behind the BDI API")

This build does not have CONFIG_BLOCK set.

These as well:

In file included from include/linux/workqueue.h:9,

                 from include/linux/mm_types.h:16,
                 from include/linux/mmzone.h:21,
                 from include/linux/gfp.h:6,
                 from include/linux/xarray.h:14,
                 from include/linux/radix-tree.h:19,
                 from include/linux/fs.h:15,
                 from include/linux/backing-dev.h:13,
                 from mm/backing-dev.c:5:
mm/backing-dev.c: In function 'bdi_alloc':
mm/backing-dev.c:821:42: error: 'laptop_mode_timer_fn' undeclared (first use in this function)
  821 |  timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
      |                                          ^~~~~~~~~~~~~~~~~~~~

include/linux/timer.h:126:28: note: in definition of macro '__init_timer'
126 | init_timer_key((_timer), (_fn), (_flags), NULL, NULL)
| ^~~
mm/backing-dev.c:821:2: note: in expansion of macro 'timer_setup'

  821 |  timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
      |  ^~~~~~~~~~~
mm/backing-dev.c:821:42: note: each undeclared identifier is reported only once for each function it appears in
  821 |  timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
      |                                          ^~~~~~~~~~~~~~~~~~~~

include/linux/timer.h:126:28: note: in definition of macro '__init_timer'
126 | init_timer_key((_timer), (_fn), (_flags), NULL, NULL)
| ^~~
mm/backing-dev.c:821:2: note: in expansion of macro 'timer_setup'

  821 |  timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
      |  ^~~~~~~~~~~
Signature · 6 lines
Cheers,
Stephen Rothwell

-- 
Cheers,
Stephen Rothwell
#2 lore raw
In reply to Stephen Rothwell

The patch below fixes it.

---
From 28be8f9a9da95d54b7fce80332bf2c62abfcdf73 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <[email protected]>
Date: Tue, 10 Aug 2021 14:39:24 +0200
Subject: writeback: make the laptop_mode prototypes available unconditionally

Fix the !CONFIG_BLOCK build after the recent cleanup.

Fixes 5ed964f8e54e ("mm: hide laptop_mode_wb_timer entirely behind the BDI API")
---
 include/linux/writeback.h | 5 -----
 1 file changed, 5 deletions(-)
include/linux/writeback.h +0 -5
index 667e86cfbdcf..270677dc4f36 100644
@@ -336,14 +336,9 @@ static inline void cgroup_writeback_umount(void)
 /*
  * mm/page-writeback.c
  */
-#ifdef CONFIG_BLOCK
 void laptop_io_completion(struct backing_dev_info *info);
 void laptop_sync_completion(void);
-void laptop_mode_sync(struct work_struct *work);
 void laptop_mode_timer_fn(struct timer_list *t);
-#else
-static inline void laptop_sync_completion(void) { }
-#endif
 bool node_dirty_ok(struct pglist_data *pgdat);
 int wb_domain_init(struct wb_domain *dom, gfp_t gfp);
 #ifdef CONFIG_CGROUP_WRITEBACK
Signature · 1 line
2.30.2
#3 lore raw
Quoted 2 lines · Christoph Hellwig

The patch below fixes it.

Added, thanks.

Signature · 1 line
Jens Axboe