aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index dca90489e3b0..b58c651d31ae 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -233,10 +233,11 @@ static int newseg (key_t key, int shmflg, size_t size)
233 shp->id = shm_buildid(id,shp->shm_perm.seq); 233 shp->id = shm_buildid(id,shp->shm_perm.seq);
234 shp->shm_file = file; 234 shp->shm_file = file;
235 file->f_dentry->d_inode->i_ino = shp->id; 235 file->f_dentry->d_inode->i_ino = shp->id;
236 if (shmflg & SHM_HUGETLB) 236
237 set_file_hugepages(file); 237 /* Hugetlb ops would have already been assigned. */
238 else 238 if (!(shmflg & SHM_HUGETLB))
239 file->f_op = &shm_file_operations; 239 file->f_op = &shm_file_operations;
240
240 shm_tot += numpages; 241 shm_tot += numpages;
241 shm_unlock(shp); 242 shm_unlock(shp);
242 return shp->id; 243 return shp->id;