Hi, I saw there are following two lines in aops->readpage method of most filesystems memset(kmap(page), 0,PAGE_SIZE); kunmap(page); This is for th page is in high mem maps to the kernel virtual addresses but kunmap is just a next statment what does this means? Thanks Prasanna
Hi,
For normal pages, kmap(page) just returns the virtual adress of the page. But for high memory pages, the kernel has to create a special mapping and then returns the page adress.
When the page has been zeroed, we can unset the mapping (kunmap()).
Correct me if I'm wrong.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/