History

printk: kmsg_dump: remove _nolock() variants

kmsg_dump_rewind() and kmsg_dump_get_line() are lockless, so there is no need for _nolock() variants. Remove these functions and switch all callers of the _nolock() variants. The functions without _nolock() were chosen because they are already exported to kernel modules.

John Ogness committed 5 years ago

Commit a4f98761 parent 996e9664 files · +14 −74Browse files

Showing the changes to kernel/debug (1 of 4 files). Show all

Unified · Split

kernel/debug/kdb/kdb_main.c+4−4
@@ -2126,8 +2126,8 @@ static int kdb_dmesg(int argc, const char **argv) · 2125 unmodified lines
2126 kdb_set(2, setargs);2126 kdb_set(2, setargs);
2127 }2127 }
2128 2128
2129 kmsg_dump_rewind_nolock(&iter);2129 kmsg_dump_rewind(&iter);
2130 while (kmsg_dump_get_line_nolock(&iter, 1, NULL, 0, NULL))2130 while (kmsg_dump_get_line(&iter, 1, NULL, 0, NULL))
2131 n++;2131 n++;
2132 2132
2133 if (lines < 0) {2133 if (lines < 0) {
@@ -2159,8 +2159,8 @@ static int kdb_dmesg(int argc, const char **argv) · 25 unmodified lines
2159 if (skip >= n || skip < 0)2159 if (skip >= n || skip < 0)
2160 return 0;2160 return 0;
2161 2161
2162 kmsg_dump_rewind_nolock(&iter);2162 kmsg_dump_rewind(&iter);
2163 while (kmsg_dump_get_line_nolock(&iter, 1, buf, sizeof(buf), &len)) {2163 while (kmsg_dump_get_line(&iter, 1, buf, sizeof(buf), &len)) {
2164 if (skip) {2164 if (skip) {
2165 skip--;2165 skip--;
2166 continue;2166 continue;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t