Commit 35ed319a authored by Vivek Goyal's avatar Vivek Goyal Committed by Linus Torvalds

[PATCH] kdump: export per cpu crash notes pointer through sysfs (fix)

Removes the call to get_cpu() and put_cpu() as it is not required.
Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 51be5606
...@@ -101,10 +101,8 @@ static ssize_t show_crash_notes(struct sys_device *dev, char *buf) ...@@ -101,10 +101,8 @@ static ssize_t show_crash_notes(struct sys_device *dev, char *buf)
* boot up and this data does not change there after. Hence this * boot up and this data does not change there after. Hence this
* operation should be safe. No locking required. * operation should be safe. No locking required.
*/ */
get_cpu();
addr = __pa(per_cpu_ptr(crash_notes, cpunum)); addr = __pa(per_cpu_ptr(crash_notes, cpunum));
rc = sprintf(buf, "%Lx\n", addr); rc = sprintf(buf, "%Lx\n", addr);
put_cpu();
return rc; return rc;
} }
static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL); static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment