aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hugh.dickins@tiscali.co.uk>2009-09-12 07:21:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 20:45:31 -0400
commit2195d2818c37bdf263865f1e9effccdd9fc5f9d4 (patch)
tree3b74a195c2b69d8390c67c7cd46139df0bdd69ec
parent69def9f05dfce3281bb06599057e6b8097385d39 (diff)
fix undefined reference to user_shm_unlock
My 353d5c30c666580347515da609dd74a2b8e9b828 "mm: fix hugetlb bug due to user_shm_unlock call" broke the CONFIG_SYSVIPC !CONFIG_MMU build of both 2.6.31 and 2.6.30.6: "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: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--ipc/shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 1bc4701ef4f0..30162a59621a 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -410,7 +410,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
410 return error; 410 return error;
411 411
412no_id: 412no_id:
413 if (shp->mlock_user) /* shmflg & SHM_HUGETLB case */ 413 if (is_file_hugepages(file) && shp->mlock_user)
414 user_shm_unlock(size, shp->mlock_user); 414 user_shm_unlock(size, shp->mlock_user);
415 fput(file); 415 fput(file);
416no_file: 416no_file: