The end of the fcntl() method
In 2.6.8, that operation is gone again. The thinking is that the file_operations structure did not really need another general-purpose, multiplexed operation like fcntl(). So the method was replaced with two new, carefully-focused methods. The first is:
int (*check_flags)(int flags);
This operation, if present, will be called in response to an fcntl(F_SETFL,...) system call. It can look at the flags passed in from user space and ensure that they make sense for the device or filesystem in question.
The other new operation is:
int (*dir_notify)(struct file *filp, unsigned long arg);
This is the new method used by CIFS to handle F_NOTIFY requests. All other fcntl() operations are handled in the core VFS code, as usual.
The patch as merged by Linus fixed the NFS
and CIFS code to use the new
methods. Unfortunately, nobody tested the NFS changes before the patch was
merged, and this change went in just before the final 2.6.8 release came
out. The result was an NFS implementation which crashed the kernel, and
the need for a quick 2.6.8.1 release.
| Index entries for this article | |
|---|---|
| Kernel | fcntl() method |
| Kernel | struct file_operations |
