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

Stephen Rothwell
2020-05-14T08:57:48Z

[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]

Hi all,

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

In file included from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/blkdev.h: In function 'blk_io_schedule':
include/linux/blkdev.h:1857:26: error: 'sysctl_hung_task_timeout_secs' undeclared (first use in this function)
1857 | unsigned long timeout = sysctl_hung_task_timeout_secs * HZ / 2;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

e6249cdd46e4 ("block: add blk_io_schedule() for avoiding task hung in sync dio")

linux/sched/sysctl.h was not included since CONFIG_BLOCK is not defined.
I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 14 May 2020 18:48:32 +1000
Subject: [PATCH] fix for "block: add blk_io_schedule() for avoiding task hung in sync dio"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
include/linux/blkdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5360696d85ff..bf99a723673b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -4,6 +4,7 @@

#include <linux/sched.h>
#include <linux/sched/clock.h>
+#include <linux/sched/sysctl.h>

#ifdef CONFIG_BLOCK

@@ -27,7 +28,6 @@
#include <linux/percpu-refcount.h>
#include <linux/scatterlist.h>
#include <linux/blkzoned.h>
-#include <linux/sched/sysctl.h>

struct module;
struct scsi_ioctl_command;
--
2.26.2

--
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]