Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 3 participants 3 messages Jun 1, 2023

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

Hi all,

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

In file included from include/linux/slab.h:15,

                 from drivers/md/raid1.c:26:
drivers/md/raid1.c: In function 'alloc_behind_master_bio':
include/linux/gfp.h:320:36: error: passing argument 1 of 'free_pages' makes integer from pointer without a cast [-Werror=int-conversion]
  320 | #define free_page(addr) free_pages((addr), 0)
      |                                    ^~~~~~
      |                                    |
      |                                    struct page *
drivers/md/raid1.c:1151:25: note: in expansion of macro 'free_page'
 1151 |                         free_page(page);
      |                         ^~~~~~~~~
include/linux/gfp.h:303:38: note: expected 'long unsigned int' but argument is of type 'struct page *'
  303 | extern void free_pages(unsigned long addr, unsigned int order);
      |                        ~~~~~~~~~~~~~~^~~~

Caused by commit

6473bc325644 ("md: check for failure when adding pages in alloc_behind_master_bio")

I have used the block tree from next-20230531 for today.

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

Hi all,

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

In file included from include/linux/slab.h:15,

                 from drivers/md/raid1.c:26:
drivers/md/raid1.c: In function 'alloc_behind_master_bio':
include/linux/gfp.h:320:36: error: passing argument 1 of 'free_pages' makes integer from pointer without a cast [-Werror=int-conversion]
  320 | #define free_page(addr) free_pages((addr), 0)
      |                                    ^~~~~~
      |                                    |
      |                                    struct page *
drivers/md/raid1.c:1151:25: note: in expansion of macro 'free_page'
 1151 |                         free_page(page);
      |                         ^~~~~~~~~
include/linux/gfp.h:303:38: note: expected 'long unsigned int' but argument is of type 'struct page *'
  303 | extern void free_pages(unsigned long addr, unsigned int order);
      |                        ~~~~~~~~~~~~~~^~~~
Quoted 6 lines

Caused by commit

6473bc325644 ("md: check for failure when adding pages in alloc_behind_master_bio")

I have used the block tree from next-20230531 for today.

This obviously has to be:

drivers/md/raid1.c +1 -1
index ff89839455ec..3570da63969b 100644
@@ -1148,7 +1148,7 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio,
                        goto free_pages;
 
                if (!bio_add_page(behind_bio, page, len, 0)) {
-                       free_page(page);
+                       put_page(page);
                        goto free_pages;
                }
 

But I wonder why I dint see it in my allmodconfig build.

Jens can you fold that in or do you want me to update the patch?

#2 lore raw
Quoted 43 lines · Johannes Thumshirn
Quoted 20 lines · Stephen Rothwell

Hi all,

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

In file included from include/linux/slab.h:15,

                 from drivers/md/raid1.c:26:
drivers/md/raid1.c: In function 'alloc_behind_master_bio':
include/linux/gfp.h:320:36: error: passing argument 1 of 'free_pages' makes integer from pointer without a cast [-Werror=int-conversion]
  320 | #define free_page(addr) free_pages((addr), 0)
      |                                    ^~~~~~
      |                                    |
      |                                    struct page *
drivers/md/raid1.c:1151:25: note: in expansion of macro 'free_page'
 1151 |                         free_page(page);
      |                         ^~~~~~~~~
include/linux/gfp.h:303:38: note: expected 'long unsigned int' but argument is of type 'struct page *'
  303 | extern void free_pages(unsigned long addr, unsigned int order);
      |                        ~~~~~~~~~~~~~~^~~~
Quoted 6 lines

Caused by commit

6473bc325644 ("md: check for failure when adding pages in alloc_behind_master_bio")

I have used the block tree from next-20230531 for today.

This obviously has to be:

drivers/md/raid1.c +1 -1
index ff89839455ec..3570da63969b 100644
@@ -1148,7 +1148,7 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio,
                        goto free_pages;
 
                if (!bio_add_page(behind_bio, page, len, 0)) {
-                       free_page(page);
+                       put_page(page);
                        goto free_pages;
                }
 
Quoted 3 lines

But I wonder why I dint see it in my allmodconfig build.

Jens can you fold that in or do you want me to update the patch?

Done

Signature · 1 line
Jens Axboe