Reputation: 428
I've found Setting creation or change timestamps, I want to try kernel modification path from the linked answer: https://stackoverflow.com/a/17066309/14557599. However, the answer is 8 years old and as I've checked the user had not posted on SO for several years. The answer says:
Here is the change to KERNEL_SRC/fs/attr.c in the notify_change function:
But there is no link to file location and I was not able to find it via web search, only reposts of that QA. Does kernel still works that way for updating change time? Please help to locate that code in current kernel source to try modification on.
Added 1:
Web search finds notify_change
in api docs: https://www.kernel.org/doc/html/latest/filesystems/api-summary.html.
Best way to find functions in kernel code advises to use http://lxr.linux.no, but search for notify_change
there produced empty result.
I've tried second way from the above answer, downloaded latest from www.kernel.org, cd
-d into folder where I extracted archive, but then:
~/Downloads/linux-5.15.12$ make cscope
GEN cscope
./scripts/tags.sh: line 126: cscope: command not found
Upvotes: -1
Views: 208
Reputation: 428
I've tried grep
:
~/Downloads/linux-5.15.12$ find . -name '*.c' -type f -exec bash -c 'grep " notify_change(" {} && ls -l {} && echo' \;
I found the code where one could have guessed it should be: ./fs/attr.c
, that is KERNEL_SRC
meant root of kernel source folder.
Upvotes: 0