diff options
| author | Cyrill Gorcunov <gorcunov@openvz.org> | 2009-10-26 16:28:11 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-11-08 07:14:22 -0500 |
| commit | c82a43d40b93200a10a9fec0a489791e65e135ca (patch) | |
| tree | 5986787e2382d88e3191cffafcdf35aa2ad8353f /kernel/irq/proc.c | |
| parent | 663e69592856df53ef52969482ef413a96bc4e06 (diff) | |
irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
If a parent directory (ie /proc/irq/<irq>) could not be created
we should not attempt to create subdirectories. Otherwise it
would lead that "smp_affinity" and "spurious" entries are may be
registered under /proc root instead of a proper place.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20091026202811.GD5321@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/proc.c')
| -rw-r--r-- | kernel/irq/proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 692363dd591f..dfef5b9f3845 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
| @@ -214,6 +214,8 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc) | |||
| 214 | 214 | ||
| 215 | /* create /proc/irq/1234 */ | 215 | /* create /proc/irq/1234 */ |
| 216 | desc->dir = proc_mkdir(name, root_irq_dir); | 216 | desc->dir = proc_mkdir(name, root_irq_dir); |
| 217 | if (!desc->dir) | ||
| 218 | return; | ||
| 217 | 219 | ||
| 218 | #ifdef CONFIG_SMP | 220 | #ifdef CONFIG_SMP |
| 219 | /* create /proc/irq/<irq>/smp_affinity */ | 221 | /* create /proc/irq/<irq>/smp_affinity */ |
