[PATCH] mm: change uses of f_{dentry,vfsmnt} to use f_path
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in linux/mm/. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f3a43f3f64
commit
d3ac7f892b
10
mm/mmap.c
10
mm/mmap.c
@ -188,7 +188,7 @@ static void __remove_shared_vm_struct(struct vm_area_struct *vma,
|
||||
struct file *file, struct address_space *mapping)
|
||||
{
|
||||
if (vma->vm_flags & VM_DENYWRITE)
|
||||
atomic_inc(&file->f_dentry->d_inode->i_writecount);
|
||||
atomic_inc(&file->f_path.dentry->d_inode->i_writecount);
|
||||
if (vma->vm_flags & VM_SHARED)
|
||||
mapping->i_mmap_writable--;
|
||||
|
||||
@ -399,7 +399,7 @@ static inline void __vma_link_file(struct vm_area_struct *vma)
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
||||
if (vma->vm_flags & VM_DENYWRITE)
|
||||
atomic_dec(&file->f_dentry->d_inode->i_writecount);
|
||||
atomic_dec(&file->f_path.dentry->d_inode->i_writecount);
|
||||
if (vma->vm_flags & VM_SHARED)
|
||||
mapping->i_mmap_writable++;
|
||||
|
||||
@ -907,7 +907,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
|
||||
* mounted, in which case we dont add PROT_EXEC.)
|
||||
*/
|
||||
if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
|
||||
if (!(file && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC)))
|
||||
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
|
||||
prot |= PROT_EXEC;
|
||||
|
||||
if (!len)
|
||||
@ -960,7 +960,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
inode = file ? file->f_dentry->d_inode : NULL;
|
||||
inode = file ? file->f_path.dentry->d_inode : NULL;
|
||||
|
||||
if (file) {
|
||||
switch (flags & MAP_TYPE) {
|
||||
@ -989,7 +989,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
|
||||
case MAP_PRIVATE:
|
||||
if (!(file->f_mode & FMODE_READ))
|
||||
return -EACCES;
|
||||
if (file->f_vfsmnt->mnt_flags & MNT_NOEXEC) {
|
||||
if (file->f_path.mnt->mnt_flags & MNT_NOEXEC) {
|
||||
if (vm_flags & VM_EXEC)
|
||||
return -EPERM;
|
||||
vm_flags &= ~VM_MAYEXEC;
|
||||
|
Reference in New Issue
Block a user