Equivalent of windows minifilter driver pre-write protection in linux?

  driver, kernel, linux, security, windows

In windows driver development, we have minifilters to protect valuable files in its pre write/setfileinformation callbacks, to protect files for example against ransomware attacks.

My question is, what is the equivelant of this in linux? I assume its only possible in kernel mode, but if it is also possible in the user mode of linux, please also let me know.

Basically the question is: is there any callback available in linux for pre-write and pre-setfileinformation of files, either user-mode or kernel-mode?

And does it provide the same,less, or more functionality compare to the windows minifilters for file protection?

Source: Windows Questions