aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index d1198dd07a1a..6d16bb6de7d2 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -168,7 +168,7 @@ static inline void shm_inc(struct ipc_namespace *ns, int id)
168static void shm_open(struct vm_area_struct *shmd) 168static void shm_open(struct vm_area_struct *shmd)
169{ 169{
170 shm_inc(shm_file_ns(shmd->vm_file), 170 shm_inc(shm_file_ns(shmd->vm_file),
171 shmd->vm_file->f_dentry->d_inode->i_ino); 171 shmd->vm_file->f_path.dentry->d_inode->i_ino);
172} 172}
173 173
174/* 174/*
@@ -187,7 +187,7 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
187 if (!is_file_hugepages(shp->shm_file)) 187 if (!is_file_hugepages(shp->shm_file))
188 shmem_lock(shp->shm_file, 0, shp->mlock_user); 188 shmem_lock(shp->shm_file, 0, shp->mlock_user);
189 else 189 else
190 user_shm_unlock(shp->shm_file->f_dentry->d_inode->i_size, 190 user_shm_unlock(shp->shm_file->f_path.dentry->d_inode->i_size,
191 shp->mlock_user); 191 shp->mlock_user);
192 fput (shp->shm_file); 192 fput (shp->shm_file);
193 security_shm_free(shp); 193 security_shm_free(shp);
@@ -203,7 +203,7 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)
203static void shm_close (struct vm_area_struct *shmd) 203static void shm_close (struct vm_area_struct *shmd)
204{ 204{
205 struct file * file = shmd->vm_file; 205 struct file * file = shmd->vm_file;
206 int id = file->f_dentry->d_inode->i_ino; 206 int id = file->f_path.dentry->d_inode->i_ino;
207 struct shmid_kernel *shp; 207 struct shmid_kernel *shp;
208 struct ipc_namespace *ns; 208 struct ipc_namespace *ns;
209 209
@@ -233,7 +233,7 @@ static int shm_mmap(struct file * file, struct vm_area_struct * vma)
233 vma->vm_ops = &shm_vm_ops; 233 vma->vm_ops = &shm_vm_ops;
234 if (!(vma->vm_flags & VM_WRITE)) 234 if (!(vma->vm_flags & VM_WRITE))
235 vma->vm_flags &= ~VM_MAYWRITE; 235 vma->vm_flags &= ~VM_MAYWRITE;
236 shm_inc(shm_file_ns(file), file->f_dentry->d_inode->i_ino); 236 shm_inc(shm_file_ns(file), file->f_path.dentry->d_inode->i_ino);
237 } 237 }
238 238
239 return ret; 239 return ret;
@@ -330,7 +330,7 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
330 shp->shm_nattch = 0; 330 shp->shm_nattch = 0;
331 shp->id = shm_buildid(ns, id, shp->shm_perm.seq); 331 shp->id = shm_buildid(ns, id, shp->shm_perm.seq);
332 shp->shm_file = file; 332 shp->shm_file = file;
333 file->f_dentry->d_inode->i_ino = shp->id; 333 file->f_path.dentry->d_inode->i_ino = shp->id;
334 334
335 shm_file_ns(file) = get_ipc_ns(ns); 335 shm_file_ns(file) = get_ipc_ns(ns);
336 336
@@ -495,7 +495,7 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,
495 if(!shp) 495 if(!shp)
496 continue; 496 continue;
497 497
498 inode = shp->shm_file->f_dentry->d_inode; 498 inode = shp->shm_file->f_path.dentry->d_inode;
499 499
500 if (is_file_hugepages(shp->shm_file)) { 500 if (is_file_hugepages(shp->shm_file)) {
501 struct address_space *mapping = inode->i_mapping; 501 struct address_space *mapping = inode->i_mapping;
@@ -843,7 +843,7 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
843 } 843 }
844 844
845 file = shp->shm_file; 845 file = shp->shm_file;
846 size = i_size_read(file->f_dentry->d_inode); 846 size = i_size_read(file->f_path.dentry->d_inode);
847 shp->shm_nattch++; 847 shp->shm_nattch++;
848 shm_unlock(shp); 848 shm_unlock(shp);
849 849
@@ -948,7 +948,7 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
948 (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) { 948 (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) {
949 949
950 950
951 size = vma->vm_file->f_dentry->d_inode->i_size; 951 size = vma->vm_file->f_path.dentry->d_inode->i_size;
952 do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start); 952 do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start);
953 /* 953 /*
954 * We discovered the size of the shm segment, so 954 * We discovered the size of the shm segment, so