diff options
author | Josef Sipek <jsipek@fsl.cs.sunysb.edu> | 2006-12-08 05:37:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:47 -0500 |
commit | e9536ae7205d255bc94616b72910fc6e16c861fe (patch) | |
tree | 4c91e2fbe096958ab8f7476306c4a61c30cbe502 /mm | |
parent | 1b04fe9a8ef10774174897b15d753b9de85fe9e9 (diff) |
[PATCH] struct path: convert mm
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mempolicy.c | 2 | ||||
-rw-r--r-- | mm/nommu.c | 12 | ||||
-rw-r--r-- | mm/readahead.c | 2 | ||||
-rw-r--r-- | mm/tiny-shmem.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index b917d6fdc1bb..da9463946556 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1857,7 +1857,7 @@ int show_numa_map(struct seq_file *m, void *v) | |||
1857 | 1857 | ||
1858 | if (file) { | 1858 | if (file) { |
1859 | seq_printf(m, " file="); | 1859 | seq_printf(m, " file="); |
1860 | seq_path(m, file->f_vfsmnt, file->f_dentry, "\n\t= "); | 1860 | seq_path(m, file->f_path.mnt, file->f_path.dentry, "\n\t= "); |
1861 | } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { | 1861 | } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { |
1862 | seq_printf(m, " heap"); | 1862 | seq_printf(m, " heap"); |
1863 | } else if (vma->vm_start <= mm->start_stack && | 1863 | } else if (vma->vm_start <= mm->start_stack && |
diff --git a/mm/nommu.c b/mm/nommu.c index af874569d0f1..23fb033e596d 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -523,7 +523,7 @@ static int validate_mmap_request(struct file *file, | |||
523 | */ | 523 | */ |
524 | mapping = file->f_mapping; | 524 | mapping = file->f_mapping; |
525 | if (!mapping) | 525 | if (!mapping) |
526 | mapping = file->f_dentry->d_inode->i_mapping; | 526 | mapping = file->f_path.dentry->d_inode->i_mapping; |
527 | 527 | ||
528 | capabilities = 0; | 528 | capabilities = 0; |
529 | if (mapping && mapping->backing_dev_info) | 529 | if (mapping && mapping->backing_dev_info) |
@@ -532,7 +532,7 @@ static int validate_mmap_request(struct file *file, | |||
532 | if (!capabilities) { | 532 | if (!capabilities) { |
533 | /* no explicit capabilities set, so assume some | 533 | /* no explicit capabilities set, so assume some |
534 | * defaults */ | 534 | * defaults */ |
535 | switch (file->f_dentry->d_inode->i_mode & S_IFMT) { | 535 | switch (file->f_path.dentry->d_inode->i_mode & S_IFMT) { |
536 | case S_IFREG: | 536 | case S_IFREG: |
537 | case S_IFBLK: | 537 | case S_IFBLK: |
538 | capabilities = BDI_CAP_MAP_COPY; | 538 | capabilities = BDI_CAP_MAP_COPY; |
@@ -563,11 +563,11 @@ static int validate_mmap_request(struct file *file, | |||
563 | !(file->f_mode & FMODE_WRITE)) | 563 | !(file->f_mode & FMODE_WRITE)) |
564 | return -EACCES; | 564 | return -EACCES; |
565 | 565 | ||
566 | if (IS_APPEND(file->f_dentry->d_inode) && | 566 | if (IS_APPEND(file->f_path.dentry->d_inode) && |
567 | (file->f_mode & FMODE_WRITE)) | 567 | (file->f_mode & FMODE_WRITE)) |
568 | return -EACCES; | 568 | return -EACCES; |
569 | 569 | ||
570 | if (locks_verify_locked(file->f_dentry->d_inode)) | 570 | if (locks_verify_locked(file->f_path.dentry->d_inode)) |
571 | return -EAGAIN; | 571 | return -EAGAIN; |
572 | 572 | ||
573 | if (!(capabilities & BDI_CAP_MAP_DIRECT)) | 573 | if (!(capabilities & BDI_CAP_MAP_DIRECT)) |
@@ -598,7 +598,7 @@ static int validate_mmap_request(struct file *file, | |||
598 | 598 | ||
599 | /* handle executable mappings and implied executable | 599 | /* handle executable mappings and implied executable |
600 | * mappings */ | 600 | * mappings */ |
601 | if (file->f_vfsmnt->mnt_flags & MNT_NOEXEC) { | 601 | if (file->f_path.mnt->mnt_flags & MNT_NOEXEC) { |
602 | if (prot & PROT_EXEC) | 602 | if (prot & PROT_EXEC) |
603 | return -EPERM; | 603 | return -EPERM; |
604 | } | 604 | } |
@@ -833,7 +833,7 @@ unsigned long do_mmap_pgoff(struct file *file, | |||
833 | continue; | 833 | continue; |
834 | 834 | ||
835 | /* search for overlapping mappings on the same file */ | 835 | /* search for overlapping mappings on the same file */ |
836 | if (vma->vm_file->f_dentry->d_inode != file->f_dentry->d_inode) | 836 | if (vma->vm_file->f_path.dentry->d_inode != file->f_path.dentry->d_inode) |
837 | continue; | 837 | continue; |
838 | 838 | ||
839 | if (vma->vm_pgoff >= pgoff + pglen) | 839 | if (vma->vm_pgoff >= pgoff + pglen) |
diff --git a/mm/readahead.c b/mm/readahead.c index a386f2b6b335..c0df5ed05f62 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -450,7 +450,7 @@ static int make_ahead_window(struct address_space *mapping, struct file *filp, | |||
450 | * | 450 | * |
451 | * Note that @filp is purely used for passing on to the ->readpage[s]() | 451 | * Note that @filp is purely used for passing on to the ->readpage[s]() |
452 | * handler: it may refer to a different file from @mapping (so we may not use | 452 | * handler: it may refer to a different file from @mapping (so we may not use |
453 | * @filp->f_mapping or @filp->f_dentry->d_inode here). | 453 | * @filp->f_mapping or @filp->f_path.dentry->d_inode here). |
454 | * Also, @ra may not be equal to &@filp->f_ra. | 454 | * Also, @ra may not be equal to &@filp->f_ra. |
455 | * | 455 | * |
456 | */ | 456 | */ |
diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index 5f2cbf0f153c..c7f6e1914bc4 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c | |||
@@ -79,8 +79,8 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) | |||
79 | d_instantiate(dentry, inode); | 79 | d_instantiate(dentry, inode); |
80 | inode->i_nlink = 0; /* It is unlinked */ | 80 | inode->i_nlink = 0; /* It is unlinked */ |
81 | 81 | ||
82 | file->f_vfsmnt = mntget(shm_mnt); | 82 | file->f_path.mnt = mntget(shm_mnt); |
83 | file->f_dentry = dentry; | 83 | file->f_path.dentry = dentry; |
84 | file->f_mapping = inode->i_mapping; | 84 | file->f_mapping = inode->i_mapping; |
85 | file->f_op = &ramfs_file_operations; | 85 | file->f_op = &ramfs_file_operations; |
86 | file->f_mode = FMODE_WRITE | FMODE_READ; | 86 | file->f_mode = FMODE_WRITE | FMODE_READ; |