Merge branch 'at91' into devel
[firefly-linux-kernel-4.4.55.git] / fs / proc / task_nommu.c
index 863464d5519c935df03a510f9ab03f7e731f14e9..64a72e2e76509545bf6c0d4d4e0788779baaab26 100644 (file)
@@ -126,6 +126,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
        struct file *file;
        dev_t dev = 0;
        int flags, len;
+       unsigned long long pgoff = 0;
 
        flags = vma->vm_flags;
        file = vma->vm_file;
@@ -134,6 +135,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
                struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
                dev = inode->i_sb->s_dev;
                ino = inode->i_ino;
+               pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
        }
 
        seq_printf(m,
@@ -144,7 +146,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
                   flags & VM_WRITE ? 'w' : '-',
                   flags & VM_EXEC ? 'x' : '-',
                   flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
-                  (unsigned long long) vma->vm_pgoff << PAGE_SHIFT,
+                  pgoff,
                   MAJOR(dev), MINOR(dev), ino, &len);
 
        if (file) {