Commit 2195d281 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

fix undefined reference to user_shm_unlock

My 353d5c30

 "mm: fix hugetlb bug due to
user_shm_unlock call" broke the CONFIG_SYSVIPC !CONFIG_MMU build of both
2.6.31 and "undefined reference to `user_shm_unlock'".

gcc didn't understand my comment! so couldn't figure out to optimize
away user_shm_unlock() from the error path in the hugetlb-less case, as
it does elsewhere.  Help it to do so, in a language it understands.
Reported-by: default avatarMike Frysinger <>
Signed-off-by: default avatarHugh Dickins <>
Signed-off-by: default avatarLinus Torvalds <>
parent 69def9f0
......@@ -410,7 +410,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
return error;
if (shp->mlock_user) /* shmflg & SHM_HUGETLB case */
if (is_file_hugepages(file) && shp->mlock_user)
user_shm_unlock(size, shp->mlock_user);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment