Commit 6e284c5
mm: Remove kmem_valid_obj()
Function kmem_dump_obj() will splat if passed a pointer to a non-slab
object. So nothing calls it directly, instead calling kmem_valid_obj()
first to determine whether the passed pointer to a valid slab object. This
means that merging kmem_valid_obj() into kmem_dump_obj() will make the
code more concise. Therefore, convert kmem_dump_obj() to work the same
way as vmalloc_dump_obj(), removing the need for the kmem_dump_obj()
caller to check kmem_valid_obj(). After this, there are no remaining
calls to kmem_valid_obj() anymore, and it can be safely removed.
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>1 parent b93c5fe commit 6e284c5
3 files changed
Lines changed: 15 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | 531 | | |
552 | 532 | | |
553 | 533 | | |
| |||
566 | 546 | | |
567 | 547 | | |
568 | 548 | | |
569 | | - | |
570 | | - | |
571 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
572 | 552 | | |
573 | | - | |
| 553 | + | |
574 | 554 | | |
575 | 555 | | |
576 | 556 | | |
577 | 557 | | |
578 | 558 | | |
579 | 559 | | |
580 | 560 | | |
581 | | - | |
582 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
583 | 564 | | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
588 | 568 | | |
589 | 569 | | |
590 | 570 | | |
| |||
621 | 601 | | |
622 | 602 | | |
623 | 603 | | |
| 604 | + | |
624 | 605 | | |
625 | 606 | | |
626 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | | - | |
1064 | | - | |
| 1063 | + | |
1065 | 1064 | | |
1066 | | - | |
1067 | 1065 | | |
1068 | 1066 | | |
1069 | 1067 | | |
| |||
0 commit comments