aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c12
1 files changed, 6 insertions, 6 deletions
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)