Linux内核阅读笔记--文件路径查找(一)
代码的位置在Linux内核源代码 fs/namei.c,网上阅读可以参考链接
http://lxr.free-electrons.com/source/fs/namei.c
整个代码的阅读起点在
do_filp_open这个函数,该函数比较短,列在下面:
struct file *do_filp_open(int dfd, struct filename *pathname,
const struct open_flags *op, int flags)
{
struct nameidata nd;
struct file *filp;
filp = path_openat(dfd, pathname, &nd, op, flags | LOOKUP_RCU);
if (unlikely(filp == ERR_PTR(-ECHILD)))