Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142543
b: refs/heads/master
c: 6260a4b
h: refs/heads/master
i:
  142541: bdac9b0
  142539: cfc954d
  142535: adb8d54
  142527: 33734e4
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Apr 7, 2009
1 parent 4404635 commit c7f8a0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fafd688e4c0c34da0f3de909881117d374e4c7af
refs/heads/master: 6260a4b0521a41189b2c2a8119096c1e21dbdf2c
4 changes: 3 additions & 1 deletion trunk/fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,15 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
struct file *file = vma->vm_file;
int flags = vma->vm_flags;
unsigned long ino = 0;
unsigned long long pgoff = 0;
dev_t dev = 0;
int len;

if (file) {
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, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
Expand All @@ -220,7 +222,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
flags & VM_WRITE ? 'w' : '-',
flags & VM_EXEC ? 'x' : '-',
flags & VM_MAYSHARE ? 's' : 'p',
((loff_t)vma->vm_pgoff) << PAGE_SHIFT,
pgoff,
MAJOR(dev), MINOR(dev), ino, &len);

/*
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/proc/task_nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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->pg_off << PAGE_SHIFT;
}

seq_printf(m,
Expand All @@ -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) {
Expand Down

0 comments on commit c7f8a0b

Please sign in to comment.