diff options
author | Krishnakumar R <rkrishnakumar@gmail.com> | 2005-10-29 21:16:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 00:40:43 -0400 |
commit | 551110a94aa15890d1709b179c4be1e66ff6db53 (patch) | |
tree | f16ab250dcb50a7839d26b7abc2a165b705c5fb0 /ipc | |
parent | 0b1533f67cc1a595457af6d05ab3510294e2ca9c (diff) |
[PATCH] hugetlb: remove repeated code
Clean up some repeated code related to HugeTLB. hugetlb_zero_setup would
have already allocated the file->f_op.
Signed-off-by: Krishnakumar. R <rkrishnakumar@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |