aboutsummaryrefslogtreecommitdiff
path: root/ipc/shm.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 01:56:31 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 01:56:31 -0500
commit81cfb8864c73230eb1c37753aba517db15cf4d8f (patch)
tree649ff25543834cf9983ea41b93126bea97d75475 /ipc/shm.c
parent0169e284f6b6b263cc7c2ed25986b96cd6fda610 (diff)
parent9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (diff)
Merge branch 'master'
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index dca90489e3b..b58c651d31a 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -233,10 +233,11 @@ static int newseg (key_t key, int shmflg, size_t size)
shp->id = shm_buildid(id,shp->shm_perm.seq);
shp->shm_file = file;
file->f_dentry->d_inode->i_ino = shp->id;
- if (shmflg & SHM_HUGETLB)
- set_file_hugepages(file);
- else
+
+ /* Hugetlb ops would have already been assigned. */
+ if (!(shmflg & SHM_HUGETLB))
file->f_op = &shm_file_operations;
+
shm_tot += numpages;
shm_unlock(shp);
return shp->id;