reiserfs: avoid objtool warning after panic

Message ID 20221215162759.3883282-1-arnd@kernel.org
State New
Headers
Series reiserfs: avoid objtool warning after panic |

Commit Message

Arnd Bergmann Dec. 15, 2022, 4:27 p.m. UTC
  From: Arnd Bergmann <arnd@arndb.de>

Calling reiserfs_panic() leaves the calling function in an
undefined state that objtool complains about, because of the
__noreturn attribute:

fs/reiserfs/do_balan.o: warning: objtool: balance_leaf+0x109fb: stack state mismatch: cfa1=4+576 cfa2=4+584
fs/reiserfs/ibalance.o: warning: objtool: balance_internal+0x6099: stack state mismatch: cfa1=4+512 cfa2=4+536
fs/reiserfs/ibalance.o: warning: objtool: internal_insert_key+0xa1c: stack state mismatch: cfa1=4+224 cfa2=4+216

Avoid that by removing the attribute, at the possible cost of
a few extra cycles. Mark the panic and error functions as __cold
instead to at least give the compiler a hint that this is not
the fast path.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/reiserfs/reiserfs.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Comments

kernel test robot Dec. 15, 2022, 10:31 p.m. UTC | #1
Hi Arnd,

I love your patch! Perhaps something to improve:

[auto build test WARNING on soc/for-next]
[also build test WARNING on linus/master v6.1 next-20221215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Arnd-Bergmann/reiserfs-avoid-objtool-warning-after-panic/20221216-003104
base:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link:    https://lore.kernel.org/r/20221215162759.3883282-1-arnd%40kernel.org
patch subject: [PATCH] reiserfs: avoid objtool warning after panic
config: x86_64-randconfig-a002
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/6717d6cf61015a15ca3b1a8623a5f3b2569312be
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arnd-Bergmann/reiserfs-avoid-objtool-warning-after-panic/20221216-003104
        git checkout 6717d6cf61015a15ca3b1a8623a5f3b2569312be
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/reiserfs/namei.o: warning: objtool: reiserfs_rename+0x212: unreachable instruction
--
>> fs/reiserfs/ibalance.o: warning: objtool: balance_internal_when_delete+0x44c: unreachable instruction
--
>> fs/reiserfs/stree.o: warning: objtool: reiserfs_cut_from_item+0x17a: unreachable instruction
--
>> fs/reiserfs/journal.o: warning: objtool: do_journal_end+0x4af: unreachable instruction
--
>> fs/reiserfs/item_ops.o: warning: objtool: direntry_check_left+0x65: unreachable instruction


objdump-func vmlinux.o reiserfs_rename:
0000 00000000003263b8 <reiserfs_rename>:
0000   3263b8:	e8 00 00 00 00       	call   3263bd <reiserfs_rename+0x5>	3263b9: R_X86_64_PLT32	__fentry__-0x4
0005   3263bd:	55                   	push   %rbp
0006   3263be:	31 c0                	xor    %eax,%eax
0008   3263c0:	48 89 e5             	mov    %rsp,%rbp
000b   3263c3:	41 57                	push   %r15
000d   3263c5:	41 56                	push   %r14
000f   3263c7:	49 89 ce             	mov    %rcx,%r14
0012   3263ca:	b9 20 00 00 00       	mov    $0x20,%ecx
0017   3263cf:	41 55                	push   %r13
0019   3263d1:	41 54                	push   %r12
001b   3263d3:	53                   	push   %rbx
001c   3263d4:	48 83 e4 f0          	and    $0xfffffffffffffff0,%rsp
0020   3263d8:	48 81 ec 70 03 00 00 	sub    $0x370,%rsp
0027   3263df:	41 83 e1 fe          	and    $0xfffffffe,%r9d
002b   3263e3:	48 8d bc 24 f0 01 00 00 	lea    0x1f0(%rsp),%rdi
0033   3263eb:	48 89 54 24 10       	mov    %rdx,0x10(%rsp)
0038   3263f0:	f3 ab                	rep stos %eax,%es:(%rdi)
003a   3263f2:	48 8d bc 24 70 02 00 00 	lea    0x270(%rsp),%rdi
0042   3263fa:	b9 20 00 00 00       	mov    $0x20,%ecx
0047   3263ff:	c7 84 24 f0 01 00 00 01 00 00 00 	movl   $0x1,0x1f0(%rsp)
0052   32640a:	f3 ab                	rep stos %eax,%es:(%rdi)
0054   32640c:	48 8d bc 24 f0 02 00 00 	lea    0x2f0(%rsp),%rdi
005c   326414:	b9 20 00 00 00       	mov    $0x20,%ecx
0061   326419:	c7 84 24 70 02 00 00 01 00 00 00 	movl   $0x1,0x270(%rsp)
006c   326424:	f3 ab                	rep stos %eax,%es:(%rdi)
006e   326426:	b8 ea ff ff ff       	mov    $0xffffffea,%eax
0073   32642b:	c7 84 24 f0 02 00 00 01 00 00 00 	movl   $0x1,0x2f0(%rsp)
007e   326436:	0f 85 3d 07 00 00    	jne    326b79 <reiserfs_rename+0x7c1>
0084   32643c:	48 8b 7e 28          	mov    0x28(%rsi),%rdi
0088   326440:	48 89 f3             	mov    %rsi,%rbx
008b   326443:	4c 8b 62 70          	mov    0x70(%rdx),%r12
008f   326447:	4d 89 c7             	mov    %r8,%r15
0092   32644a:	48 c7 84 24 f0 00 00 00 00 00 00 00 	movq   $0x0,0xf0(%rsp)
009e   326456:	4d 8b 68 70          	mov    0x70(%r8),%r13
00a2   32645a:	e8 00 00 00 00       	call   32645f <reiserfs_rename+0xa7>	32645b: R_X86_64_PLT32	reiserfs_write_lock-0x4
00a7   32645f:	48 8b 44 24 10       	mov    0x10(%rsp),%rax
00ac   326464:	48 89 df             	mov    %rbx,%rdi
00af   326467:	4c 8d 84 24 b8 00 00 00 	lea    0xb8(%rsp),%r8
00b7   32646f:	48 8d 8c 24 f0 01 00 00 	lea    0x1f0(%rsp),%rcx
00bf   326477:	8b 50 64             	mov    0x64(%rax),%edx
00c2   32647a:	48 8b 70 68          	mov    0x68(%rax),%rsi
00c6   32647e:	e8 c9 ed ff ff       	call   32524c <reiserfs_find_entry>
00cb   326483:	48 8d bc 24 f0 01 00 00 	lea    0x1f0(%rsp),%rdi
00d3   32648b:	89 44 24 0c          	mov    %eax,0xc(%rsp)
00d7   32648f:	e8 00 00 00 00       	call   326494 <reiserfs_rename+0xdc>	326490: R_X86_64_PLT32	pathrelse-0x4
00dc   326494:	8b 44 24 0c          	mov    0xc(%rsp),%eax
00e0   326498:	83 f8 fe             	cmp    $0xfffffffe,%eax
00e3   32649b:	0f 84 ad 02 00 00    	je     32674e <reiserfs_rename+0x396>
00e9   3264a1:	ff c8                	dec    %eax
00eb   3264a3:	75 0e                	jne    3264b3 <reiserfs_rename+0xfb>
00ed   3264a5:	8b 84 24 fc 00 00 00 	mov    0xfc(%rsp),%eax
00f4   3264ac:	49 3b 44 24 40       	cmp    0x40(%r12),%rax
00f9   3264b1:	74 13                	je     3264c6 <reiserfs_rename+0x10e>
00fb   3264b3:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
00ff   3264b7:	e8 00 00 00 00       	call   3264bc <reiserfs_rename+0x104>	3264b8: R_X86_64_PLT32	reiserfs_write_unlock-0x4
0104   3264bc:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
0109   3264c1:	e9 b3 06 00 00       	jmp    326b79 <reiserfs_rename+0x7c1>
010e   3264c6:	41 8b 04 24          	mov    (%r12),%eax
0112   3264ca:	66 25 00 f0          	and    $0xf000,%ax
0116   3264ce:	66 89 44 24 0c       	mov    %ax,0xc(%rsp)
011b   3264d3:	66 3d 00 40          	cmp    $0x4000,%ax
011f   3264d7:	0f 85 89 00 00 00    	jne    326566 <reiserfs_rename+0x1ae>
0125   3264dd:	4d 85 ed             	test   %r13,%r13
0128   3264e0:	74 23                	je     326505 <reiserfs_rename+0x14d>
012a   3264e2:	49 8b 45 50          	mov    0x50(%r13),%rax
012e   3264e6:	48 83 f8 30          	cmp    $0x30,%rax
0132   3264ea:	74 19                	je     326505 <reiserfs_rename+0x14d>
0134   3264ec:	48 83 f8 23          	cmp    $0x23,%rax
0138   3264f0:	74 13                	je     326505 <reiserfs_rename+0x14d>
013a   3264f2:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
013e   3264f6:	e8 00 00 00 00       	call   3264fb <reiserfs_rename+0x143>	3264f7: R_X86_64_PLT32	reiserfs_write_unlock-0x4
0143   3264fb:	b8 d9 ff ff ff       	mov    $0xffffffd9,%eax
0148   326500:	e9 74 06 00 00       	jmp    326b79 <reiserfs_rename+0x7c1>
014d   326505:	4c 8d 84 24 88 01 00 00 	lea    0x188(%rsp),%r8
0155   32650d:	ba 02 00 00 00       	mov    $0x2,%edx
015a   326512:	4c 89 e7             	mov    %r12,%rdi
015d   326515:	48 c7 c6 00 00 00 00 	mov    $0x0,%rsi	326518: R_X86_64_32S	.rodata.str1.1+0x58f6a
0164   32651c:	48 8d 8c 24 f0 02 00 00 	lea    0x2f0(%rsp),%rcx
016c   326524:	48 c7 84 24 c0 01 00 00 00 00 00 00 	movq   $0x0,0x1c0(%rsp)
0178   326530:	e8 f8 ea ff ff       	call   32502d <reiserfs_find_entry.part.0>
017d   326535:	48 8d bc 24 f0 02 00 00 	lea    0x2f0(%rsp),%rdi
0185   32653d:	89 44 24 08          	mov    %eax,0x8(%rsp)
0189   326541:	e8 00 00 00 00       	call   326546 <reiserfs_rename+0x18e>	326542: R_X86_64_PLT32	pathrelse-0x4
018e   326546:	83 7c 24 08 01       	cmpl   $0x1,0x8(%rsp)
0193   32654b:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
0197   32654f:	0f 85 fd 01 00 00    	jne    326752 <reiserfs_rename+0x39a>
019d   326555:	8b 84 24 cc 01 00 00 	mov    0x1cc(%rsp),%eax
01a4   32655c:	48 3b 43 40          	cmp    0x40(%rbx),%rax
01a8   326560:	0f 85 ec 01 00 00    	jne    326752 <reiserfs_rename+0x39a>
01ae   326566:	48 8b 73 28          	mov    0x28(%rbx),%rsi
01b2   32656a:	ba 3b 00 00 00       	mov    $0x3b,%edx
01b7   32656f:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
01bf   326577:	e8 00 00 00 00       	call   32657c <reiserfs_rename+0x1c4>	326578: R_X86_64_PLT32	journal_begin-0x4
01c4   32657c:	85 c0                	test   %eax,%eax
01c6   32657e:	0f 85 e4 05 00 00    	jne    326b68 <reiserfs_rename+0x7b0>
01cc   326584:	41 8b 4f 64          	mov    0x64(%r15),%ecx
01d0   326588:	49 8b 57 68          	mov    0x68(%r15),%rdx
01d4   32658c:	45 31 c9             	xor    %r9d,%r9d
01d7   32658f:	4d 89 e0             	mov    %r12,%r8
01da   326592:	4c 89 f6             	mov    %r14,%rsi
01dd   326595:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
01e5   32659d:	e8 e2 f1 ff ff       	call   325784 <reiserfs_add_entry>
01ea   3265a2:	83 f8 ef             	cmp    $0xffffffef,%eax
01ed   3265a5:	75 25                	jne    3265cc <reiserfs_rename+0x214>
01ef   3265a7:	4d 85 ed             	test   %r13,%r13
01f2   3265aa:	75 54                	jne    326600 <reiserfs_rename+0x248>
01f4   3265ac:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
01f8   3265b0:	48 c7 c1 00 00 00 00 	mov    $0x0,%rcx	3265b3: R_X86_64_32S	.rodata.str1.1+0x58f6d
01ff   3265b7:	48 c7 c2 00 00 00 00 	mov    $0x0,%rdx	3265ba: R_X86_64_32S	.rodata+0x441510
0206   3265be:	48 c7 c6 00 00 00 00 	mov    $0x0,%rsi	3265c1: R_X86_64_32S	.rodata.str1.1+0x58f90
020d   3265c5:	e8 00 00 00 00       	call   3265ca <reiserfs_rename+0x212>	3265c6: R_X86_64_PLT32	__reiserfs_panic-0x4
0212   3265ca:	eb 34                	jmp    326600 <reiserfs_rename+0x248>
0214   3265cc:	85 c0                	test   %eax,%eax
0216   3265ce:	74 30                	je     326600 <reiserfs_rename+0x248>
0218   3265d0:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
0220   3265d8:	89 44 24 0c          	mov    %eax,0xc(%rsp)
0224   3265dc:	e8 00 00 00 00       	call   3265e1 <reiserfs_rename+0x229>	3265dd: R_X86_64_PLT32	journal_end-0x4
0229   3265e1:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
022d   3265e5:	89 44 24 10          	mov    %eax,0x10(%rsp)
0231   3265e9:	e8 00 00 00 00       	call   3265ee <reiserfs_rename+0x236>	3265ea: R_X86_64_PLT32	reiserfs_write_unlock-0x4
0236   3265ee:	8b 44 24 10          	mov    0x10(%rsp),%eax
023a   3265f2:	8b 54 24 0c          	mov    0xc(%rsp),%edx
023e   3265f6:	85 c0                	test   %eax,%eax
0240   3265f8:	0f 44 c2             	cmove  %edx,%eax
0243   3265fb:	e9 79 05 00 00       	jmp    326b79 <reiserfs_rename+0x7c1>
0248   326600:	48 89 df             	mov    %rbx,%rdi
024b   326603:	e8 00 00 00 00       	call   326608 <reiserfs_rename+0x250>	326604: R_X86_64_PLT32	reiserfs_update_inode_transaction-0x4
0250   326608:	4c 89 f7             	mov    %r14,%rdi
0253   32660b:	e8 00 00 00 00       	call   326610 <reiserfs_rename+0x258>	32660c: R_X86_64_PLT32	reiserfs_update_inode_transaction-0x4
0258   326610:	4c 89 e7             	mov    %r12,%rdi
025b   326613:	e8 00 00 00 00       	call   326618 <reiserfs_rename+0x260>	326614: R_X86_64_PLT32	reiserfs_update_inode_transaction-0x4
0260   326618:	4d 85 ed             	test   %r13,%r13
0263   32661b:	74 08                	je     326625 <reiserfs_rename+0x26d>
0265   32661d:	4c 89 ef             	mov    %r13,%rdi
0268   326620:	e8 00 00 00 00       	call   326625 <reiserfs_rename+0x26d>	326621: R_X86_64_PLT32	reiserfs_update_inode_transaction-0x4
026d   326625:	49 8b 7e 28          	mov    0x28(%r14),%rdi
0271   326629:	48 8d 8c 24 b8 00 00 00 	lea    0xb8(%rsp),%rcx
0279   326631:	48 8d 94 24 f0 01 00 00 	lea    0x1f0(%rsp),%rdx
0281   326639:	48 8d b4 24 00 01 00 00 	lea    0x100(%rsp),%rsi
0289   326641:	e8 00 00 00 00       	call   326646 <reiserfs_rename+0x28e>	326642: R_X86_64_PLT32	search_by_entry_key-0x4
028e   326646:	ff c8                	dec    %eax
0290   326648:	48 8d bc 24 f0 01 00 00 	lea    0x1f0(%rsp),%rdi
0298   326650:	0f 85 e6 00 00 00    	jne    32673c <reiserfs_rename+0x384>
029e   326656:	e8 46 e5 ff ff       	call   324ba1 <tp_item_head>
02a3   32665b:	48 89 c6             	mov    %rax,%rsi
02a6   32665e:	48 8d 7c 24 40       	lea    0x40(%rsp),%rdi
02ab   326663:	e8 00 00 00 00       	call   326668 <reiserfs_rename+0x2b0>	326664: R_X86_64_PLT32	copy_item_head-0x4
02b0   326668:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
02b5   32666d:	ba 01 00 00 00       	mov    $0x1,%edx
02ba   326672:	48 8b b4 24 b8 00 00 00 	mov    0xb8(%rsp),%rsi
02c2   32667a:	e8 00 00 00 00       	call   32667f <reiserfs_rename+0x2c7>	32667b: R_X86_64_PLT32	reiserfs_prepare_for_journal-0x4
02c7   32667f:	41 8b 57 64          	mov    0x64(%r15),%edx
02cb   326683:	49 8b 77 68          	mov    0x68(%r15),%rsi
02cf   326687:	4c 89 f7             	mov    %r14,%rdi
02d2   32668a:	4c 8d 84 24 20 01 00 00 	lea    0x120(%rsp),%r8
02da   326692:	48 8d 8c 24 70 02 00 00 	lea    0x270(%rsp),%rcx
02e2   32669a:	48 c7 84 24 58 01 00 00 00 00 00 00 	movq   $0x0,0x158(%rsp)
02ee   3266a6:	e8 a1 eb ff ff       	call   32524c <reiserfs_find_entry>
02f3   3266ab:	83 e0 fd             	and    $0xfffffffd,%eax
02f6   3266ae:	48 8d bc 24 70 02 00 00 	lea    0x270(%rsp),%rdi
02fe   3266b6:	ff c8                	dec    %eax
0300   3266b8:	75 75                	jne    32672f <reiserfs_rename+0x377>
0302   3266ba:	e8 e2 e4 ff ff       	call   324ba1 <tp_item_head>
0307   3266bf:	48 89 c6             	mov    %rax,%rsi
030a   3266c2:	48 8d 7c 24 20       	lea    0x20(%rsp),%rdi
030f   3266c7:	e8 00 00 00 00       	call   3266cc <reiserfs_rename+0x314>	3266c8: R_X86_64_PLT32	copy_item_head-0x4
0314   3266cc:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
0319   3266d1:	ba 01 00 00 00       	mov    $0x1,%edx
031e   3266d6:	48 8b b4 24 20 01 00 00 	mov    0x120(%rsp),%rsi
0326   3266de:	e8 00 00 00 00       	call   3266e3 <reiserfs_rename+0x32b>	3266df: R_X86_64_PLT32	reiserfs_prepare_for_journal-0x4
032b   3266e3:	41 8b 04 24          	mov    (%r12),%eax
032f   3266e7:	66 25 00 f0          	and    $0xf000,%ax
0333   3266eb:	66 3d 00 40          	cmp    $0x4000,%ax
0337   3266ef:	0f 85 95 00 00 00    	jne    32678a <reiserfs_rename+0x3d2>
033d   3266f5:	49 8b 7e 28          	mov    0x28(%r14),%rdi
0341   3266f9:	48 8d 8c 24 88 01 00 00 	lea    0x188(%rsp),%rcx
0349   326701:	48 8d 94 24 f0 02 00 00 	lea    0x2f0(%rsp),%rdx
0351   326709:	48 8d b4 24 d0 01 00 00 	lea    0x1d0(%rsp),%rsi
0359   326711:	e8 00 00 00 00       	call   326716 <reiserfs_rename+0x35e>	326712: R_X86_64_PLT32	search_by_entry_key-0x4
035e   326716:	ff c8                	dec    %eax
0360   326718:	48 8d bc 24 f0 02 00 00 	lea    0x2f0(%rsp),%rdi
0368   326720:	74 3f                	je     326761 <reiserfs_rename+0x3a9>
036a   326722:	e8 00 00 00 00       	call   326727 <reiserfs_rename+0x36f>	326723: R_X86_64_PLT32	pathrelse-0x4
036f   326727:	48 8d bc 24 70 02 00 00 	lea    0x270(%rsp),%rdi
0377   32672f:	e8 00 00 00 00       	call   326734 <reiserfs_rename+0x37c>	326730: R_X86_64_PLT32	pathrelse-0x4
037c   326734:	48 8d bc 24 f0 01 00 00 	lea    0x1f0(%rsp),%rdi
0384   32673c:	e8 00 00 00 00       	call   326741 <reiserfs_rename+0x389>	32673d: R_X86_64_PLT32	pathrelse-0x4
0389   326741:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
0391   326749:	e8 00 00 00 00       	call   32674e <reiserfs_rename+0x396>	32674a: R_X86_64_PLT32	journal_end-0x4
0396   32674e:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
039a   326752:	e8 00 00 00 00       	call   326757 <reiserfs_rename+0x39f>	326753: R_X86_64_PLT32	reiserfs_write_unlock-0x4
039f   326757:	b8 fb ff ff ff       	mov    $0xfffffffb,%eax
03a4   32675c:	e9 18 04 00 00       	jmp    326b79 <reiserfs_rename+0x7c1>
03a9   326761:	e8 3b e4 ff ff       	call   324ba1 <tp_item_head>
03ae   326766:	48 89 c6             	mov    %rax,%rsi
03b1   326769:	48 8d 7c 24 60       	lea    0x60(%rsp),%rdi
03b6   32676e:	e8 00 00 00 00       	call   326773 <reiserfs_rename+0x3bb>	32676f: R_X86_64_PLT32	copy_item_head-0x4
03bb   326773:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
03c0   326778:	ba 01 00 00 00       	mov    $0x1,%edx
03c5   32677d:	48 8b b4 24 88 01 00 00 	mov    0x188(%rsp),%rsi
03cd   326785:	e8 00 00 00 00       	call   32678a <reiserfs_rename+0x3d2>	326786: R_X86_64_PLT32	reiserfs_prepare_for_journal-0x4
03d2   32678a:	48 8d b4 24 70 02 00 00 	lea    0x270(%rsp),%rsi
03da   326792:	48 8d 7c 24 20       	lea    0x20(%rsp),%rdi
03df   326797:	e8 00 00 00 00       	call   32679c <reiserfs_rename+0x3e4>	326798: R_X86_64_PLT32	comp_items-0x4
03e4   32679c:	85 c0                	test   %eax,%eax
03e6   32679e:	74 36                	je     3267d6 <reiserfs_rename+0x41e>
03e8   3267a0:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
03ed   3267a5:	48 8b b4 24 20 01 00 00 	mov    0x120(%rsp),%rsi
03f5   3267ad:	e8 00 00 00 00       	call   3267b2 <reiserfs_rename+0x3fa>	3267ae: R_X86_64_PLT32	reiserfs_restore_prepared_buffer-0x4
03fa   3267b2:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
03ff   3267b7:	48 8b b4 24 b8 00 00 00 	mov    0xb8(%rsp),%rsi
0407   3267bf:	e8 00 00 00 00       	call   3267c4 <reiserfs_rename+0x40c>	3267c0: R_X86_64_PLT32	reiserfs_restore_prepared_buffer-0x4
040c   3267c4:	66 81 7c 24 0c 00 40 	cmpw   $0x4000,0xc(%rsp)
0413   3267cb:	0f 85 54 fe ff ff    	jne    326625 <reiserfs_rename+0x26d>
0419   3267d1:	e9 99 00 00 00       	jmp    32686f <reiserfs_rename+0x4b7>
041e   3267d6:	41 8b 77 64          	mov    0x64(%r15),%esi
0422   3267da:	49 8b 7f 68          	mov    0x68(%r15),%rdi
0426   3267de:	4c 89 e9             	mov    %r13,%rcx
0429   3267e1:	48 8d 94 24 20 01 00 00 	lea    0x120(%rsp),%rdx
0431   3267e9:	e8 2d e6 ff ff       	call   324e1b <entry_points_to_object>
0436   3267ee:	85 c0                	test   %eax,%eax
0438   3267f0:	74 ae                	je     3267a0 <reiserfs_rename+0x3e8>
043a   3267f2:	48 8d b4 24 f0 01 00 00 	lea    0x1f0(%rsp),%rsi
0442   3267fa:	48 8d 7c 24 40       	lea    0x40(%rsp),%rdi
0447   3267ff:	e8 00 00 00 00       	call   326804 <reiserfs_rename+0x44c>	326800: R_X86_64_PLT32	comp_items-0x4
044c   326804:	85 c0                	test   %eax,%eax
044e   326806:	75 98                	jne    3267a0 <reiserfs_rename+0x3e8>
0450   326808:	48 8b 44 24 10       	mov    0x10(%rsp),%rax
0455   32680d:	4c 89 e1             	mov    %r12,%rcx
0458   326810:	48 8d 94 24 b8 00 00 00 	lea    0xb8(%rsp),%rdx
0460   326818:	8b 70 64             	mov    0x64(%rax),%esi
0463   32681b:	48 8b 78 68          	mov    0x68(%rax),%rdi
0467   32681f:	e8 f7 e5 ff ff       	call   324e1b <entry_points_to_object>
046c   326824:	85 c0                	test   %eax,%eax
046e   326826:	0f 84 74 ff ff ff    	je     3267a0 <reiserfs_rename+0x3e8>
0474   32682c:	66 81 7c 24 0c 00 40 	cmpw   $0x4000,0xc(%rsp)
047b   326833:	75 71                	jne    3268a6 <reiserfs_rename+0x4ee>
047d   326835:	48 8d b4 24 f0 02 00 00 	lea    0x2f0(%rsp),%rsi
0485   32683d:	48 8d 7c 24 60       	lea    0x60(%rsp),%rdi
048a   326842:	e8 00 00 00 00       	call   326847 <reiserfs_rename+0x48f>	326843: R_X86_64_PLT32	comp_items-0x4
048f   326847:	85 c0                	test   %eax,%eax
0491   326849:	74 3b                	je     326886 <reiserfs_rename+0x4ce>
0493   32684b:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
0498   326850:	48 8b b4 24 b8 00 00 00 	mov    0xb8(%rsp),%rsi
04a0   326858:	e8 00 00 00 00       	call   32685d <reiserfs_rename+0x4a5>	326859: R_X86_64_PLT32	reiserfs_restore_prepared_buffer-0x4
04a5   32685d:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
04aa   326862:	48 8b b4 24 20 01 00 00 	mov    0x120(%rsp),%rsi
04b2   32686a:	e8 00 00 00 00       	call   32686f <reiserfs_rename+0x4b7>	32686b: R_X86_64_PLT32	reiserfs_restore_prepared_buffer-0x4
04b7   32686f:	49 8b 7c 24 28       	mov    0x28(%r12),%rdi
04bc   326874:	48 8b b4 24 88 01 00 00 	mov    0x188(%rsp),%rsi
04c4   32687c:	e8 00 00 00 00       	call   326881 <reiserfs_rename+0x4c9>	32687d: R_X86_64_PLT32	reiserfs_restore_prepared_buffer-0x4
04c9   326881:	e9 9f fd ff ff       	jmp    326625 <reiserfs_rename+0x26d>
04ce   326886:	48 89 d9             	mov    %rbx,%rcx
04d1   326889:	48 8d 94 24 88 01 00 00 	lea    0x188(%rsp),%rdx
04d9   326891:	be 02 00 00 00       	mov    $0x2,%esi
04de   326896:	48 c7 c7 00 00 00 00 	mov    $0x0,%rdi	326899: R_X86_64_32S	.rodata.str1.1+0x58f6a
04e5   32689d:	e8 79 e5 ff ff       	call   324e1b <entry_points_to_object>
04ea   3268a2:	85 c0                	test   %eax,%eax
04ec   3268a4:	74 a5                	je     32684b <reiserfs_rename+0x493>
04ee   3268a6:	48 63 bc 24 38 01 00 00 	movslq 0x138(%rsp),%rdi
04f6   3268ae:	41 bf 01 00 00 00    	mov    $0x1,%r15d
04fc   3268b4:	48 c1 e7 04          	shl    $0x4,%rdi
0500   3268b8:	48 03 bc 24 40 01 00 00 	add    0x140(%rsp),%rdi
0508   3268c0:	48 83 c7 0e          	add    $0xe,%rdi
050c   3268c4:	48 89 fe             	mov    %rdi,%rsi
050f   3268c7:	c1 e7 03             	shl    $0x3,%edi
0512   3268ca:	83 e7 38             	and    $0x38,%edi
0515   3268cd:	48 83 e6 f8          	and    $0xfffffffffffffff8,%rsi
0519   3268d1:	83 c7 02             	add    $0x2,%edi
051c   3268d4:	e8 0e e4 ff ff       	call   324ce7 <__test_and_set_bit_le.isra.0>
0521   3268d9:	48 63 84 24 38 01 00 00 	movslq 0x138(%rsp),%rax
0529   3268e1:	41 8b 94 24 18 ff ff ff 	mov    -0xe8(%r12),%edx
0531   3268e9:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
0539   3268f1:	48 c1 e0 04          	shl    $0x4,%rax
053d   3268f5:	48 03 84 24 40 01 00 00 	add    0x140(%rsp),%rax
0545   3268fd:	89 50 04             	mov    %edx,0x4(%rax)
0548   326900:	48 63 84 24 38 01 00 00 	movslq 0x138(%rsp),%rax
0550   326908:	41 8b 94 24 1c ff ff ff 	mov    -0xe4(%r12),%edx
0558   326910:	48 8b b4 24 20 01 00 00 	mov    0x120(%rsp),%rsi
0560   326918:	48 c1 e0 04          	shl    $0x4,%rax
0564   32691c:	48 03 84 24 40 01 00 00 	add    0x140(%rsp),%rax
056c   326924:	89 50 08             	mov    %edx,0x8(%rax)
056f   326927:	e8 00 00 00 00       	call   32692c <reiserfs_rename+0x574>	326928: R_X86_64_PLT32	journal_mark_dirty-0x4
0574   32692c:	48 63 bc 24 d0 00 00 00 	movslq 0xd0(%rsp),%rdi
057c   326934:	48 c1 e7 04          	shl    $0x4,%rdi
0580   326938:	48 03 bc 24 d8 00 00 00 	add    0xd8(%rsp),%rdi
0588   326940:	48 83 c7 0e          	add    $0xe,%rdi
058c   326944:	48 89 fe             	mov    %rdi,%rsi
058f   326947:	c1 e7 03             	shl    $0x3,%edi
0592   32694a:	83 e7 38             	and    $0x38,%edi
0595   32694d:	48 83 e6 f8          	and    $0xfffffffffffffff8,%rsi
0599   326951:	83 c7 02             	add    $0x2,%edi
059c   326954:	e8 82 e3 ff ff       	call   324cdb <__test_and_clear_bit_le.isra.0>
05a1   326959:	48 8b b4 24 b8 00 00 00 	mov    0xb8(%rsp),%rsi
05a9   326961:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
05b1   326969:	e8 00 00 00 00       	call   32696e <reiserfs_rename+0x5b6>	32696a: R_X86_64_PLT32	journal_mark_dirty-0x4
05b6   32696e:	48 89 df             	mov    %rbx,%rdi
05b9   326971:	e8 00 00 00 00       	call   326976 <reiserfs_rename+0x5be>	326972: R_X86_64_PLT32	current_time-0x4
05be   326976:	48 89 43 68          	mov    %rax,0x68(%rbx)
05c2   32697a:	48 89 53 70          	mov    %rdx,0x70(%rbx)
05c6   32697e:	48 89 43 78          	mov    %rax,0x78(%rbx)
05ca   326982:	48 89 93 80 00 00 00 	mov    %rdx,0x80(%rbx)
05d1   326989:	49 89 46 68          	mov    %rax,0x68(%r14)
05d5   32698d:	49 89 56 70          	mov    %rdx,0x70(%r14)
05d9   326991:	49 89 46 78          	mov    %rax,0x78(%r14)
05dd   326995:	49 89 96 80 00 00 00 	mov    %rdx,0x80(%r14)
05e4   32699c:	49 89 44 24 78       	mov    %rax,0x78(%r12)
05e9   3269a1:	49 89 94 24 80 00 00 00 	mov    %rdx,0x80(%r12)
05f1   3269a9:	4d 85 ed             	test   %r13,%r13
05f4   3269ac:	74 42                	je     3269f0 <reiserfs_rename+0x638>
05f6   3269ae:	41 8b 4d 00          	mov    0x0(%r13),%ecx
05fa   3269b2:	48 89 44 24 10       	mov    %rax,0x10(%rsp)
05ff   3269b7:	4c 89 ef             	mov    %r13,%rdi
0602   3269ba:	48 89 54 24 18       	mov    %rdx,0x18(%rsp)
0607   3269bf:	66 81 e1 00 f0       	and    $0xf000,%cx
060c   3269c4:	66 81 f9 00 40       	cmp    $0x4000,%cx
0611   3269c9:	75 07                	jne    3269d2 <reiserfs_rename+0x61a>
0613   3269cb:	e8 00 00 00 00       	call   3269d0 <reiserfs_rename+0x618>	3269cc: R_X86_64_PLT32	clear_nlink-0x4
0618   3269d0:	eb 05                	jmp    3269d7 <reiserfs_rename+0x61f>
061a   3269d2:	e8 00 00 00 00       	call   3269d7 <reiserfs_rename+0x61f>	3269d3: R_X86_64_PLT32	drop_nlink-0x4
061f   3269d7:	48 8b 44 24 10       	mov    0x10(%rsp),%rax
0624   3269dc:	48 8b 54 24 18       	mov    0x18(%rsp),%rdx
0629   3269e1:	45 8b 7d 48          	mov    0x48(%r13),%r15d
062d   3269e5:	49 89 45 78          	mov    %rax,0x78(%r13)
0631   3269e9:	49 89 95 80 00 00 00 	mov    %rdx,0x80(%r13)
0638   3269f0:	66 81 7c 24 0c 00 40 	cmpw   $0x4000,0xc(%rsp)
063f   3269f7:	0f 85 8a 00 00 00    	jne    326a87 <reiserfs_rename+0x6cf>
0645   3269fd:	48 63 84 24 a0 01 00 00 	movslq 0x1a0(%rsp),%rax
064d   326a05:	41 8b 96 18 ff ff ff 	mov    -0xe8(%r14),%edx
0654   326a0c:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
065c   326a14:	48 c1 e0 04          	shl    $0x4,%rax
0660   326a18:	48 03 84 24 a8 01 00 00 	add    0x1a8(%rsp),%rax
0668   326a20:	89 50 04             	mov    %edx,0x4(%rax)
066b   326a23:	48 63 84 24 a0 01 00 00 	movslq 0x1a0(%rsp),%rax
0673   326a2b:	41 8b 96 1c ff ff ff 	mov    -0xe4(%r14),%edx
067a   326a32:	48 8b b4 24 88 01 00 00 	mov    0x188(%rsp),%rsi
0682   326a3a:	48 c1 e0 04          	shl    $0x4,%rax
0686   326a3e:	48 03 84 24 a8 01 00 00 	add    0x1a8(%rsp),%rax
068e   326a46:	89 50 08             	mov    %edx,0x8(%rax)
0691   326a49:	e8 00 00 00 00       	call   326a4e <reiserfs_rename+0x696>	326a4a: R_X86_64_PLT32	journal_mark_dirty-0x4
0696   326a4e:	4d 85 ed             	test   %r13,%r13
0699   326a51:	75 26                	jne    326a79 <reiserfs_rename+0x6c1>
069b   326a53:	41 83 7e 48 01       	cmpl   $0x1,0x48(%r14)
06a0   326a58:	74 1f                	je     326a79 <reiserfs_rename+0x6c1>
06a2   326a5a:	4c 89 f7             	mov    %r14,%rdi
06a5   326a5d:	e8 00 00 00 00       	call   326a62 <reiserfs_rename+0x6aa>	326a5e: R_X86_64_PLT32	inc_nlink-0x4
06aa   326a62:	41 81 7e 48 16 fc 00 00 	cmpl   $0xfc16,0x48(%r14)
06b2   326a6a:	76 0d                	jbe    326a79 <reiserfs_rename+0x6c1>
06b4   326a6c:	be 01 00 00 00       	mov    $0x1,%esi
06b9   326a71:	4c 89 f7             	mov    %r14,%rdi
06bc   326a74:	e8 00 00 00 00       	call   326a79 <reiserfs_rename+0x6c1>	326a75: R_X86_64_PLT32	set_nlink-0x4
06c1   326a79:	83 7b 48 01          	cmpl   $0x1,0x48(%rbx)
06c5   326a7d:	74 08                	je     326a87 <reiserfs_rename+0x6cf>
06c7   326a7f:	48 89 df             	mov    %rbx,%rdi
06ca   326a82:	e8 00 00 00 00       	call   326a87 <reiserfs_rename+0x6cf>	326a83: R_X86_64_PLT32	drop_nlink-0x4
06cf   326a87:	48 8d bc 24 70 02 00 00 	lea    0x270(%rsp),%rdi
06d7   326a8f:	e8 00 00 00 00       	call   326a94 <reiserfs_rename+0x6dc>	326a90: R_X86_64_PLT32	pathrelse-0x4
06dc   326a94:	48 8d bc 24 f0 02 00 00 	lea    0x2f0(%rsp),%rdi
06e4   326a9c:	e8 00 00 00 00       	call   326aa1 <reiserfs_rename+0x6e9>	326a9d: R_X86_64_PLT32	pathrelse-0x4
06e9   326aa1:	45 31 c9             	xor    %r9d,%r9d
06ec   326aa4:	45 31 c0             	xor    %r8d,%r8d
06ef   326aa7:	48 89 d9             	mov    %rbx,%rcx
06f2   326aaa:	48 8d 94 24 00 01 00 00 	lea    0x100(%rsp),%rdx
06fa   326ab2:	48 8d b4 24 f0 01 00 00 	lea    0x1f0(%rsp),%rsi
0702   326aba:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
070a   326ac2:	e8 00 00 00 00       	call   326ac7 <reiserfs_rename+0x70f>	326ac3: R_X86_64_PLT32	reiserfs_cut_from_item-0x4
070f   326ac7:	85 c0                	test   %eax,%eax
0711   326ac9:	79 1e                	jns    326ae9 <reiserfs_rename+0x731>
0713   326acb:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
0717   326acf:	48 c7 c1 00 00 00 00 	mov    $0x0,%rcx	326ad2: R_X86_64_32S	.rodata.str1.1+0x58f98
071e   326ad6:	48 c7 c2 00 00 00 00 	mov    $0x0,%rdx	326ad9: R_X86_64_32S	.rodata+0x441510
0725   326add:	48 c7 c6 00 00 00 00 	mov    $0x0,%rsi	326ae0: R_X86_64_32S	.rodata.str1.1+0x58fbf
072c   326ae4:	e8 00 00 00 00       	call   326ae9 <reiserfs_rename+0x731>	326ae5: R_X86_64_PLT32	__reiserfs_error-0x4
0731   326ae9:	48 63 94 24 e0 00 00 00 	movslq 0xe0(%rsp),%rdx
0739   326af1:	48 c7 c0 f0 ff ff ff 	mov    $0xfffffffffffffff0,%rax
0740   326af8:	48 89 de             	mov    %rbx,%rsi
0743   326afb:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
074b   326b03:	48 29 d0             	sub    %rdx,%rax
074e   326b06:	48 01 43 50          	add    %rax,0x50(%rbx)
0752   326b0a:	e8 1a e1 ff ff       	call   324c29 <reiserfs_update_sd>
0757   326b0f:	4c 89 f6             	mov    %r14,%rsi
075a   326b12:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
0762   326b1a:	e8 0a e1 ff ff       	call   324c29 <reiserfs_update_sd>
0767   326b1f:	4c 89 e6             	mov    %r12,%rsi
076a   326b22:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
0772   326b2a:	e8 fa e0 ff ff       	call   324c29 <reiserfs_update_sd>
0777   326b2f:	4d 85 ed             	test   %r13,%r13
077a   326b32:	74 27                	je     326b5b <reiserfs_rename+0x7a3>
077c   326b34:	4d 85 ff             	test   %r15,%r15
077f   326b37:	75 12                	jne    326b4b <reiserfs_rename+0x793>
0781   326b39:	31 d2                	xor    %edx,%edx
0783   326b3b:	4c 89 ee             	mov    %r13,%rsi
0786   326b3e:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
078e   326b46:	e8 00 00 00 00       	call   326b4b <reiserfs_rename+0x793>	326b47: R_X86_64_PLT32	add_save_link-0x4
0793   326b4b:	4c 89 ee             	mov    %r13,%rsi
0796   326b4e:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
079e   326b56:	e8 ce e0 ff ff       	call   324c29 <reiserfs_update_sd>
07a3   326b5b:	48 8d bc 24 80 00 00 00 	lea    0x80(%rsp),%rdi
07ab   326b63:	e8 00 00 00 00       	call   326b68 <reiserfs_rename+0x7b0>	326b64: R_X86_64_PLT32	journal_end-0x4
07b0   326b68:	48 8b 7b 28          	mov    0x28(%rbx),%rdi
07b4   326b6c:	89 44 24 10          	mov    %eax,0x10(%rsp)
07b8   326b70:	e8 00 00 00 00       	call   326b75 <reiserfs_rename+0x7bd>	326b71: R_X86_64_PLT32	reiserfs_write_unlock-0x4
07bd   326b75:	8b 44 24 10          	mov    0x10(%rsp),%eax
07c1   326b79:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
07c5   326b7d:	5b                   	pop    %rbx
07c6   326b7e:	41 5c                	pop    %r12
07c8   326b80:	41 5d                	pop    %r13
07ca   326b82:	41 5e                	pop    %r14
07cc   326b84:	41 5f                	pop    %r15
07ce   326b86:	5d                   	pop    %rbp
07cf   326b87:	e9 00 00 00 00       	jmp    326b8c <reiserfs_get_parent>	326b88: R_X86_64_PLT32	__x86_return_thunk-0x4
  
kernel test robot Dec. 15, 2022, 10:51 p.m. UTC | #2
Hi Arnd,

I love your patch! Perhaps something to improve:

[auto build test WARNING on soc/for-next]
[also build test WARNING on linus/master v6.1 next-20221215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Arnd-Bergmann/reiserfs-avoid-objtool-warning-after-panic/20221216-003104
base:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link:    https://lore.kernel.org/r/20221215162759.3883282-1-arnd%40kernel.org
patch subject: [PATCH] reiserfs: avoid objtool warning after panic
config: x86_64-randconfig-a006
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/6717d6cf61015a15ca3b1a8623a5f3b2569312be
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arnd-Bergmann/reiserfs-avoid-objtool-warning-after-panic/20221216-003104
        git checkout 6717d6cf61015a15ca3b1a8623a5f3b2569312be
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/reiserfs/bitmap.o: warning: objtool: get_left_neighbor.cold+0x25: unreachable instruction
--
>> fs/reiserfs/do_balan.o: warning: objtool: check_internal_node+0x22e: unreachable instruction
--
>> fs/reiserfs/namei.o: warning: objtool: search_by_entry_key+0x40c: unreachable instruction
--
>> fs/reiserfs/inode.o: warning: objtool: reiserfs_update_sd_size.cold+0x48: unreachable instruction
--
>> fs/reiserfs/dir.o: warning: objtool: reiserfs_readdir_inode.cold+0x33: unreachable instruction
--
>> fs/reiserfs/fix_node.o: warning: objtool: create_virtual_node+0x16b7: unreachable instruction
--
>> fs/reiserfs/super.o: warning: objtool: add_save_link.cold+0x29: unreachable instruction
--
>> fs/reiserfs/objectid.o: warning: objtool: reiserfs_get_unused_objectid.cold+0x1d: unreachable instruction
--
>> fs/reiserfs/lbalance.o: warning: objtool: leaf_paste_in_buffer+0xcb6: unreachable instruction
--
>> fs/reiserfs/stree.o: warning: objtool: search_by_key+0x189d: unreachable instruction
--
>> fs/reiserfs/tail_conversion.o: warning: objtool: direct2indirect+0x89e: unreachable instruction
..


objdump-func vmlinux.o get_left_neighbor.cold:
  
Arnd Bergmann Dec. 16, 2022, 8 a.m. UTC | #3
On Thu, Dec 15, 2022, at 23:31, kernel test robot wrote:
> Hi Arnd,
>
> I love your patch! Perhaps something to improve:
>
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce (this is a W=1 build):
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> fs/reiserfs/namei.o: warning: objtool: reiserfs_rename+0x212: unreachable instruction
> --
>>> fs/reiserfs/ibalance.o: warning: objtool: balance_internal_when_delete+0x44c: unreachable instruction
> --
>>> fs/reiserfs/stree.o: warning: objtool: reiserfs_cut_from_item+0x17a: unreachable instruction
> --
>>> fs/reiserfs/journal.o: warning: objtool: do_journal_end+0x4af: unreachable instruction
> --
>>> fs/reiserfs/item_ops.o: warning: objtool: direntry_check_left+0x65: unreachable instruction

Ok, I'll have to revisit this one. I think I tried something similar
before and ran into the same problem but I though I had figured
it out this time.

The problem apparently is that the patch to shut up the objtool
warning with clang in turn adds a different objtool warning with
gcc...

    Arnd
  

Patch

diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 3aa928ec527a..1c22f48235c2 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -3185,12 +3185,11 @@  int fix_nodes(int n_op_mode, struct tree_balance *tb,
 void unfix_nodes(struct tree_balance *);
 
 /* prints.c */
-void __reiserfs_panic(struct super_block *s, const char *id,
-		      const char *function, const char *fmt, ...)
-    __attribute__ ((noreturn));
+void __cold __reiserfs_panic(struct super_block *s, const char *id,
+		      const char *function, const char *fmt, ...);
 #define reiserfs_panic(s, id, fmt, args...) \
 	__reiserfs_panic(s, id, __func__, fmt, ##args)
-void __reiserfs_error(struct super_block *s, const char *id,
+void __cold __reiserfs_error(struct super_block *s, const char *id,
 		      const char *function, const char *fmt, ...);
 #define reiserfs_error(s, id, fmt, args...) \
 	 __reiserfs_error(s, id, __func__, fmt, ##args)