VFS Operations - File Open
Given a file path, an open mode and a file permissions mask:
Entry function: sys_open, in fs/open.c.
Underlying open function: filp_open, in fs/open.c.
- Allocate a free file descriptor.
- Try to open the file (next slide).
- On success, put the new 'struct file' in the fd table of the process.
On error, free the allocated file descriptor.
Originally written by
guy keren