Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754193AbZILLWH (ORCPT ); Sat, 12 Sep 2009 07:22:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753826AbZILLWG (ORCPT ); Sat, 12 Sep 2009 07:22:06 -0400 Received: from mk-filter-3-a-1.mail.uk.tiscali.com ([212.74.100.54]:6507 "EHLO mk-filter-3-a-1.mail.uk.tiscali.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753734AbZILLWF (ORCPT ); Sat, 12 Sep 2009 07:22:05 -0400 X-Trace: 257803292/mk-filter-3.mail.uk.tiscali.com/B2C/$b2c-THROTTLED-DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/80.41.93.26/None/hugh.dickins@tiscali.co.uk X-SBRS: None X-RemoteIP: 80.41.93.26 X-IP-MAIL-FROM: hugh.dickins@tiscali.co.uk X-SMTP-AUTH: X-MUA: X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AigFADchq0pQKV0a/2dsb2JhbACBU9kKhBgF X-IronPort-AV: E=Sophos;i="4.44,375,1249254000"; d="scan'208";a="257803292" Date: Sat, 12 Sep 2009 12:21:27 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@sister.anvils To: Linus Torvalds cc: Mike Frysinger , Stefan Huber , Andrew Morton , Peter Meerwald , James Morris , William Irwin , Mel Gorman , Ravikiran G Thirumalai , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@kernel.org Subject: [PATCH] fix undefined reference to user_shm_unlock In-Reply-To: Message-ID: References: <4A929BF5.2050105@gmail.com> <8bd0f97a0909110703o4d496a45jddc0d7d6fd8674b4@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 32 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 Signed-off-by: Hugh Dickins Cc: stable@kernel.org --- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 2.6.31/ipc/shm.c 2009-09-09 23:13:59.000000000 +0100 +++ linux/ipc/shm.c 2009-09-12 11:27:00.000000000 +0100 @@ -410,7 +410,7 @@ static int newseg(struct ipc_namespace * return error; no_id: - if (shp->mlock_user) /* shmflg & SHM_HUGETLB case */ + if (is_file_hugepages(file) && shp->mlock_user) user_shm_unlock(size, shp->mlock_user); fput(file); no_file: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/