get_current() returns the pointer to process descriptor
(struct task_struct). Kernel allocates 8KB per each process,
which is used for the process descriptor of process, and
process kernel stack. So masking out 13 LSB of stack
poiniter yields the pointer to process descriptor.
You can find more explanation in the Chapter 3 of
<Understanding the Linux Kernel>
fs field in the process descriptor describes the root directory
and the current working directory of the process. so
current->fs->root is the pointer to the directory entry of
process' root directory.
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Lee, Ho. Software Engineer, Embedded Linux Dep, LinuxOne
ICQ : #52017992, Mail : flyduck@linuxone.co.kr, i@flyduck.com
Homepage : http://flyduck.com, http://linuxkernel.to
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/