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
21262126 kdb_set(2, setargs);
21272127 }
21282128
2129− kmsg_dump_rewind_nolock(&iter);
2130− while (kmsg_dump_get_line_nolock(&iter, 1, NULL, 0, NULL))
2129+ kmsg_dump_rewind(&iter);
2130+ while (kmsg_dump_get_line(&iter, 1, NULL, 0, NULL))
21312131 n++;
21322132
21332133 if (lines < 0) {
@@ -2159,8 +2159,8 @@ static int kdb_dmesg(int argc, const char **argv) · 25 unmodified lines
21592159 if (skip >= n || skip < 0)
21602160 return 0;
21612161
2162− kmsg_dump_rewind_nolock(&iter);
2163− while (kmsg_dump_get_line_nolock(&iter, 1, buf, sizeof(buf), &len)) {
2162+ kmsg_dump_rewind(&iter);
2163+ while (kmsg_dump_get_line(&iter, 1, buf, sizeof(buf), &len)) {
21642164 if (skip) {
21652165 skip--;
21662166 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