fs/proc/vmcore.c: simpler /proc/vmcore cleanup
"Linux Kernel Mailing List" <[email protected]>
| Newsgroups | gmane.linux.kernel.commits.head |
|---|---|
| Message-ID | <[email protected]> |
Web: https://git.kernel.org/torvalds/c/593bc695a1102a540f1613c651e73693b17a7343 Commit: 593bc695a1102a540f1613c651e73693b17a7343 Parent: ac7f1061c2c11bb8936b1b6a94cdb48de732f7a4 Refname: refs/heads/master Author: Alexey Dobriyan <[email protected]> AuthorDate: Tue Feb 6 15:37:02 2018 -0800 Committer: Linus Torvalds <[email protected]> CommitDate: Tue Feb 6 18:32:43 2018 -0800 fs/proc/vmcore.c: simpler /proc/vmcore cleanup Iterators aren't necessary as you can just grab the first entry and delete it until no entries left. Link: http://lkml.kernel.org/r/20171121191121.GA20757@avx2 Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Mahesh Salgaonkar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> --- fs/proc/vmcore.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 885d445afa0d..a45f0af22a60 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -1178,18 +1178,16 @@ fs_initcall(vmcore_init); /* Cleanup function for vmcore module. */ void vmcore_cleanup(void) { - struct list_head *pos, *next;