aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/mqueue.c16
-rw-r--r--ipc/shm.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 3acc1661e517..02717f71d8d0 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -322,7 +322,7 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
322static ssize_t mqueue_read_file(struct file *filp, char __user *u_data, 322static ssize_t mqueue_read_file(struct file *filp, char __user *u_data,
323 size_t count, loff_t * off) 323 size_t count, loff_t * off)
324{ 324{
325 struct mqueue_inode_info *info = MQUEUE_I(filp->f_dentry->d_inode); 325 struct mqueue_inode_info *info = MQUEUE_I(filp->f_path.dentry->d_inode);
326 char buffer[FILENT_SIZE]; 326 char buffer[FILENT_SIZE];
327 size_t slen; 327 size_t slen;
328 loff_t o; 328 loff_t o;
@@ -354,13 +354,13 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data,
354 return -EFAULT; 354 return -EFAULT;
355 355
356 *off = o + count; 356 *off = o + count;
357 filp->f_dentry->d_inode->i_atime = filp->f_dentry->d_inode->i_ctime = CURRENT_TIME; 357 filp->f_path.dentry->d_inode->i_atime = filp->f_path.dentry->d_inode->i_ctime = CURRENT_TIME;
358 return count; 358 return count;
359} 359}
360 360
361static int mqueue_flush_file(struct file *filp, fl_owner_t id) 361static int mqueue_flush_file(struct file *filp, fl_owner_t id)
362{ 362{
363 struct mqueue_inode_info *info = MQUEUE_I(filp->f_dentry->d_inode); 363 struct mqueue_inode_info *info = MQUEUE_I(filp->f_path.dentry->d_inode);
364 364
365 spin_lock(&info->lock); 365 spin_lock(&info->lock);
366 if (task_tgid(current) == info->notify_owner) 366 if (task_tgid(current) == info->notify_owner)
@@ -372,7 +372,7 @@ static int mqueue_flush_file(struct file *filp, fl_owner_t id)
372 372
373static unsigned int mqueue_poll_file(struct file *filp, struct poll_table_struct *poll_tab) 373static unsigned int mqueue_poll_file(struct file *filp, struct poll_table_struct *poll_tab)
374{ 374{
375 struct mqueue_inode_info *info = MQUEUE_I(filp->f_dentry->d_inode); 375 struct mqueue_inode_info *info = MQUEUE_I(filp->f_path.dentry->d_inode);
376 int retval = 0; 376 int retval = 0;
377 377
378 poll_wait(filp, &info->wait_q, poll_tab); 378 poll_wait(filp, &info->wait_q, poll_tab);
@@ -836,7 +836,7 @@ asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr,
836 if (unlikely(!filp)) 836 if (unlikely(!filp))
837 goto out; 837 goto out;
838 838
839 inode = filp->f_dentry->d_inode; 839 inode = filp->f_path.dentry->d_inode;
840 if (unlikely(filp->f_op != &mqueue_file_operations)) 840 if (unlikely(filp->f_op != &mqueue_file_operations))
841 goto out_fput; 841 goto out_fput;
842 info = MQUEUE_I(inode); 842 info = MQUEUE_I(inode);
@@ -919,7 +919,7 @@ asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr,
919 if (unlikely(!filp)) 919 if (unlikely(!filp))
920 goto out; 920 goto out;
921 921
922 inode = filp->f_dentry->d_inode; 922 inode = filp->f_path.dentry->d_inode;
923 if (unlikely(filp->f_op != &mqueue_file_operations)) 923 if (unlikely(filp->f_op != &mqueue_file_operations))
924 goto out_fput; 924 goto out_fput;
925 info = MQUEUE_I(inode); 925 info = MQUEUE_I(inode);
@@ -1056,7 +1056,7 @@ retry:
1056 if (!filp) 1056 if (!filp)
1057 goto out; 1057 goto out;
1058 1058
1059 inode = filp->f_dentry->d_inode; 1059 inode = filp->f_path.dentry->d_inode;
1060 if (unlikely(filp->f_op != &mqueue_file_operations)) 1060 if (unlikely(filp->f_op != &mqueue_file_operations))
1061 goto out_fput; 1061 goto out_fput;
1062 info = MQUEUE_I(inode); 1062 info = MQUEUE_I(inode);
@@ -1126,7 +1126,7 @@ asmlinkage long sys_mq_getsetattr(mqd_t mqdes,
1126 if (!filp) 1126 if (!filp)
1127 goto out; 1127 goto out;
1128 1128
1129 inode = filp->f_dentry->d_inode; 1129 inode = filp->f_path.dentry->d_inode;
1130 if (unlikely(filp->f_op != &mqueue_file_operations)) 1130 if (unlikely(filp->f_op != &mqueue_file_operations))
1131 goto out_fput; 1131 goto out_fput;
1132 info = MQUEUE_I(inode); 1132 info = MQUEUE_I(inode);
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