aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 11bec626c228..16e39230aa0d 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -878,8 +878,8 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
878 if (err) 878 if (err)
879 goto out_unlock; 879 goto out_unlock;
880 880
881 path.dentry = dget(shp->shm_file->f_path.dentry); 881 path = shp->shm_file->f_path;
882 path.mnt = shp->shm_file->f_path.mnt; 882 path_get(&path);
883 shp->shm_nattch++; 883 shp->shm_nattch++;
884 size = i_size_read(path.dentry->d_inode); 884 size = i_size_read(path.dentry->d_inode);
885 shm_unlock(shp); 885 shm_unlock(shp);
@@ -889,8 +889,8 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
889 if (!sfd) 889 if (!sfd)
890 goto out_put_dentry; 890 goto out_put_dentry;
891 891
892 file = alloc_file(path.mnt, path.dentry, f_mode, 892 file = alloc_file(&path, f_mode,
893 is_file_hugepages(shp->shm_file) ? 893 is_file_hugepages(shp->shm_file) ?
894 &shm_file_operations_huge : 894 &shm_file_operations_huge :
895 &shm_file_operations); 895 &shm_file_operations);
896 if (!file) 896 if (!file)
@@ -950,7 +950,7 @@ out_unlock:
950out_free: 950out_free:
951 kfree(sfd); 951 kfree(sfd);
952out_put_dentry: 952out_put_dentry:
953 dput(path.dentry); 953 path_put(&path);
954 goto out_nattch; 954 goto out_nattch;
955} 955}
956 956