I'm studying about Linux kernel and I have a problem.
I see many Linux kernel source files have current->files
. So what is the current
?
struct file *fget(unsigned int fd){ struct file *file; struct files_struct *files = current->files; rcu_read_lock(); file = fcheck_files(files, fd); if (file) { /* File object ref couldn't be taken */ if (file->f_mode & FMODE_PATH || !atomic_long_inc_not_zero(&file->f_count)) file = NULL; } rcu_read_unlock(); return file; }