I\'m trying to make a linux kernel module, which supports open, close, read and write operations. So I want to register these functions via struct file_operations, however I can
Note that release isn’t invoked every time a process calls close. Whenever a file structure is shared (for example, after a fork or a dup),release won’t be invoked until all copies are closed. If you need to flush pending data when any copy is closed, you should implement the flush method.
taken from LDD3 (chapter 3).