• Steven Rostedt (Red Hat)'s avatar
    ftrace/scripts: Have recordmcount copy the object file · 8cfcb2dc
    Steven Rostedt (Red Hat) authored
    commit a50bd439 upstream.
    
    Russell King found that he had weird side effects when compiling the kernel
    with hard linked ccache. The reason was that recordmcount modified the
    kernel in place via mmap, and when a file gets modified twice by
    recordmcount, it will complain about it. To fix this issue, Russell wrote a
    patch that checked if the file was hard linked more than once and would
    unlink it if it was.
    
    Linus Torvalds was not happy with the fact that recordmcount does this in
    place modification. Instead of doing the unlink only if the file has two or
    more hard links, it does the unlink all the time. In otherwords, it always
    does a copy if it changed something. That is, it does the write out if a
    change was made.
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    8cfcb2dc
recordmcount.c 14.3 KB