As you can see here :
It was completely unrelated to the fact that I was modifying the file contents.
Printable View
No prob;). But that would have been a serious kernel problem, because if you have races with this scheme :
remove_watch
write_whatever_you_want
close_file
add_new_watch
then it means that you're not doing the right thing in the kernel. After the remove_watch you should be free to do whatever you want and after the close file you should be free to add any watch you want.
Obviously talking about a single-threaded app.