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’t find ‘close’ entry in the struct.
I think I should use ‘release’ instead of ‘close’, but I wonder why the name is ‘release’ and not ‘close’?
I’m trying to make a linux kernel module, which supports open, close, read and
Share
Because the file may be opened multiple times, when you close a descriptor, only on the last close call for the last reference to the file invokes release. So there is a difference between close and release.