aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/fadvise.c2
-rw-r--r--mm/filemap.c2
-rw-r--r--mm/filemap_xip.c2
-rw-r--r--mm/mmap.c10
-rw-r--r--mm/shmem.c20
-rw-r--r--mm/swapfile.c4
6 files changed, 20 insertions, 20 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c
index 168c78a121bb..0df4c899e979 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -38,7 +38,7 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
38 if (!file) 38 if (!file)
39 return -EBADF; 39 return -EBADF;
40 40
41 if (S_ISFIFO(file->f_dentry->d_inode->i_mode)) { 41 if (S_ISFIFO(file->f_path.dentry->d_inode->i_mode)) {
42 ret = -ESPIPE; 42 ret = -ESPIPE;
43 goto out; 43 goto out;
44 } 44 }
diff --git a/mm/filemap.c b/mm/filemap.c
index af7e2f5caea9..606432f71b3a 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2269,7 +2269,7 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
2269 if (count == 0) 2269 if (count == 0)
2270 goto out; 2270 goto out;
2271 2271
2272 err = remove_suid(file->f_dentry); 2272 err = remove_suid(file->f_path.dentry);
2273 if (err) 2273 if (err)
2274 goto out; 2274 goto out;
2275 2275
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index b4fd0d7c9bfb..8d667617f558 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -379,7 +379,7 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
379 if (count == 0) 379 if (count == 0)
380 goto out_backing; 380 goto out_backing;
381 381
382 ret = remove_suid(filp->f_dentry); 382 ret = remove_suid(filp->f_path.dentry);
383 if (ret) 383 if (ret)
384 goto out_backing; 384 goto out_backing;
385 385
diff --git a/mm/mmap.c b/mm/mmap.c
index 7be110e98d4c..9717337293c3 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -188,7 +188,7 @@ static void __remove_shared_vm_struct(struct vm_area_struct *vma,
188 struct file *file, struct address_space *mapping) 188 struct file *file, struct address_space *mapping)
189{ 189{
190 if (vma->vm_flags & VM_DENYWRITE) 190 if (vma->vm_flags & VM_DENYWRITE)
191 atomic_inc(&file->f_dentry->d_inode->i_writecount); 191 atomic_inc(&file->f_path.dentry->d_inode->i_writecount);
192 if (vma->vm_flags & VM_SHARED) 192 if (vma->vm_flags & VM_SHARED)
193 mapping->i_mmap_writable--; 193 mapping->i_mmap_writable--;
194 194
@@ -399,7 +399,7 @@ static inline void __vma_link_file(struct vm_area_struct *vma)
399 struct address_space *mapping = file->f_mapping; 399 struct address_space *mapping = file->f_mapping;
400 400
401 if (vma->vm_flags & VM_DENYWRITE) 401 if (vma->vm_flags & VM_DENYWRITE)
402 atomic_dec(&file->f_dentry->d_inode->i_writecount); 402 atomic_dec(&file->f_path.dentry->d_inode->i_writecount);
403 if (vma->vm_flags & VM_SHARED) 403 if (vma->vm_flags & VM_SHARED)
404 mapping->i_mmap_writable++; 404 mapping->i_mmap_writable++;
405 405
@@ -907,7 +907,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
907 * mounted, in which case we dont add PROT_EXEC.) 907 * mounted, in which case we dont add PROT_EXEC.)
908 */ 908 */
909 if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC)) 909 if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
910 if (!(file && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))) 910 if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
911 prot |= PROT_EXEC; 911 prot |= PROT_EXEC;
912 912
913 if (!len) 913 if (!len)
@@ -960,7 +960,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
960 return -EAGAIN; 960 return -EAGAIN;
961 } 961 }
962 962
963 inode = file ? file->f_dentry->d_inode : NULL; 963 inode = file ? file->f_path.dentry->d_inode : NULL;
964 964
965 if (file) { 965 if (file) {
966 switch (flags & MAP_TYPE) { 966 switch (flags & MAP_TYPE) {
@@ -989,7 +989,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
989 case MAP_PRIVATE: 989 case MAP_PRIVATE:
990 if (!(file->f_mode & FMODE_READ)) 990 if (!(file->f_mode & FMODE_READ))
991 return -EACCES; 991 return -EACCES;
992 if (file->f_vfsmnt->mnt_flags & MNT_NOEXEC) { 992 if (file->f_path.mnt->mnt_flags & MNT_NOEXEC) {
993 if (vm_flags & VM_EXEC) 993 if (vm_flags & VM_EXEC)
994 return -EPERM; 994 return -EPERM;
995 vm_flags &= ~VM_MAYEXEC; 995 vm_flags &= ~VM_MAYEXEC;
diff --git a/mm/shmem.c b/mm/shmem.c
index c820b4f77b8d..4bb28d218eb5 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1225,7 +1225,7 @@ failed:
1225 1225
1226struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int *type) 1226struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
1227{ 1227{
1228 struct inode *inode = vma->vm_file->f_dentry->d_inode; 1228 struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
1229 struct page *page = NULL; 1229 struct page *page = NULL;
1230 unsigned long idx; 1230 unsigned long idx;
1231 int error; 1231 int error;
@@ -1248,7 +1248,7 @@ static int shmem_populate(struct vm_area_struct *vma,
1248 unsigned long addr, unsigned long len, 1248 unsigned long addr, unsigned long len,
1249 pgprot_t prot, unsigned long pgoff, int nonblock) 1249 pgprot_t prot, unsigned long pgoff, int nonblock)
1250{ 1250{
1251 struct inode *inode = vma->vm_file->f_dentry->d_inode; 1251 struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
1252 struct mm_struct *mm = vma->vm_mm; 1252 struct mm_struct *mm = vma->vm_mm;
1253 enum sgp_type sgp = nonblock? SGP_QUICK: SGP_CACHE; 1253 enum sgp_type sgp = nonblock? SGP_QUICK: SGP_CACHE;
1254 unsigned long size; 1254 unsigned long size;
@@ -1293,14 +1293,14 @@ static int shmem_populate(struct vm_area_struct *vma,
1293#ifdef CONFIG_NUMA 1293#ifdef CONFIG_NUMA
1294int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new) 1294int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
1295{ 1295{
1296 struct inode *i = vma->vm_file->f_dentry->d_inode; 1296 struct inode *i = vma->vm_file->f_path.dentry->d_inode;
1297 return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new); 1297 return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new);
1298} 1298}
1299 1299
1300struct mempolicy * 1300struct mempolicy *
1301shmem_get_policy(struct vm_area_struct *vma, unsigned long addr) 1301shmem_get_policy(struct vm_area_struct *vma, unsigned long addr)
1302{ 1302{
1303 struct inode *i = vma->vm_file->f_dentry->d_inode; 1303 struct inode *i = vma->vm_file->f_path.dentry->d_inode;
1304 unsigned long idx; 1304 unsigned long idx;
1305 1305
1306 idx = ((addr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; 1306 idx = ((addr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
@@ -1310,7 +1310,7 @@ shmem_get_policy(struct vm_area_struct *vma, unsigned long addr)
1310 1310
1311int shmem_lock(struct file *file, int lock, struct user_struct *user) 1311int shmem_lock(struct file *file, int lock, struct user_struct *user)
1312{ 1312{
1313 struct inode *inode = file->f_dentry->d_inode; 1313 struct inode *inode = file->f_path.dentry->d_inode;
1314 struct shmem_inode_info *info = SHMEM_I(inode); 1314 struct shmem_inode_info *info = SHMEM_I(inode);
1315 int retval = -ENOMEM; 1315 int retval = -ENOMEM;
1316 1316
@@ -1422,7 +1422,7 @@ shmem_prepare_write(struct file *file, struct page *page, unsigned offset, unsig
1422static ssize_t 1422static ssize_t
1423shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) 1423shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
1424{ 1424{
1425 struct inode *inode = file->f_dentry->d_inode; 1425 struct inode *inode = file->f_path.dentry->d_inode;
1426 loff_t pos; 1426 loff_t pos;
1427 unsigned long written; 1427 unsigned long written;
1428 ssize_t err; 1428 ssize_t err;
@@ -1442,7 +1442,7 @@ shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t
1442 if (err || !count) 1442 if (err || !count)
1443 goto out; 1443 goto out;
1444 1444
1445 err = remove_suid(file->f_dentry); 1445 err = remove_suid(file->f_path.dentry);
1446 if (err) 1446 if (err)
1447 goto out; 1447 goto out;
1448 1448
@@ -1524,7 +1524,7 @@ out:
1524 1524
1525static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor) 1525static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor)
1526{ 1526{
1527 struct inode *inode = filp->f_dentry->d_inode; 1527 struct inode *inode = filp->f_path.dentry->d_inode;
1528 struct address_space *mapping = inode->i_mapping; 1528 struct address_space *mapping = inode->i_mapping;
1529 unsigned long index, offset; 1529 unsigned long index, offset;
1530 1530
@@ -2493,8 +2493,8 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags)
2493 d_instantiate(dentry, inode); 2493 d_instantiate(dentry, inode);
2494 inode->i_size = size; 2494 inode->i_size = size;
2495 inode->i_nlink = 0; /* It is unlinked */ 2495 inode->i_nlink = 0; /* It is unlinked */
2496 file->f_vfsmnt = mntget(shm_mnt); 2496 file->f_path.mnt = mntget(shm_mnt);
2497 file->f_dentry = dentry; 2497 file->f_path.dentry = dentry;
2498 file->f_mapping = inode->i_mapping; 2498 file->f_mapping = inode->i_mapping;
2499 file->f_op = &shmem_file_operations; 2499 file->f_op = &shmem_file_operations;
2500 file->f_mode = FMODE_WRITE | FMODE_READ; 2500 file->f_mode = FMODE_WRITE | FMODE_READ;
diff --git a/mm/swapfile.c b/mm/swapfile.c
index c5431072f422..b9fc0e5de6d5 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1357,10 +1357,10 @@ static int swap_show(struct seq_file *swap, void *v)
1357 } 1357 }
1358 1358
1359 file = ptr->swap_file; 1359 file = ptr->swap_file;
1360 len = seq_path(swap, file->f_vfsmnt, file->f_dentry, " \t\n\\"); 1360 len = seq_path(swap, file->f_path.mnt, file->f_path.dentry, " \t\n\\");
1361 seq_printf(swap, "%*s%s\t%u\t%u\t%d\n", 1361 seq_printf(swap, "%*s%s\t%u\t%u\t%d\n",
1362 len < 40 ? 40 - len : 1, " ", 1362 len < 40 ? 40 - len : 1, " ",
1363 S_ISBLK(file->f_dentry->d_inode->i_mode) ? 1363 S_ISBLK(file->f_path.dentry->d_inode->i_mode) ?
1364 "partition" : "file\t", 1364 "partition" : "file\t",
1365 ptr->pages << (PAGE_SHIFT - 10), 1365 ptr->pages << (PAGE_SHIFT - 10),
1366 ptr->inuse_pages << (PAGE_SHIFT - 10), 1366 ptr->inuse_pages << (PAGE_SHIFT - 10),