Patchwork fix blk-exec.c compile error: always define 'sysctl_hung_task_timeout_secs' (resend)

login
register
mail settings
Submitter Mark Lord
Date Sept. 24, 2010, 9:46 p.m.
Message ID <1285364797.12723.1.camel@corey>
Download mbox | patch
Permalink /patch/65701/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Mark Lord - Sept. 24, 2010, 9:46 p.m.
Ensure that 'sysctl_hung_task_timeout_secs' is defined
even when CONFIG_DETECT_HUNG_TASK is not set.
This way we can safely reference it without need for
ifdefs in the code elsewhere.  eg. in block/blk-exec.c

Signed-off-by: Mark Lord <mlord@pobox.com>

(Resending from a repaired email client.)
Jens: my apologies for not catching this this earlier.




--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jens Axboe - Sept. 25, 2010, 9:18 a.m.
On 2010-09-24 23:46, Mark Lord wrote:
> Ensure that 'sysctl_hung_task_timeout_secs' is defined
> even when CONFIG_DETECT_HUNG_TASK is not set.
> This way we can safely reference it without need for
> ifdefs in the code elsewhere.  eg. in block/blk-exec.c

Thanks Mark, applied.

Patch

--- a/include/linux/sched.h	2010-09-20 19:56:53.000000000 -0400
+++ b/include/linux/sched.h	2010-09-24 17:22:01.707291995 -0400
@@ -336,6 +336,9 @@ 
 extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
 					 void __user *buffer,
 					 size_t *lenp, loff_t *ppos);
+#else
+/* Avoid need for ifdefs elsewhere in the code */
+enum { sysctl_hung_task_timeout_secs = 0 };
 #endif
 
 /* Attach to any functions which should be ignored in wchan output. */