I was reading the memory management chapter of Linux Device drivers and i came accross the vm_area_struct .The structure has an offfset field namely unsigned long vm_pgoff .
I checked the comment for the member as
/* Offset (within vm_file) in PAGE_SIZE units, *not* PAGE_CACHE_SIZE */
unsigned long off = vma->vm_pgoff << PAGE_SHIFT;
In the source code (file mm.h) of function
static inline unsigned long do_mmap(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flag, unsigned long offset)
I have found expression
offset >> PAGE_SHIFT (right shift) that is used as
pgoff parameter of
do_mmap_pgoff, so it is obvious, to "restore" original
offset value we need to do Left Shift with the same
PAGE_SHIFT (as function
lowmem_page_address do that).