From patchwork Tue Feb 24 19:05:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fred Isaman X-Patchwork-Id: 8631 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1OJ5SO3020186 for ; Tue, 24 Feb 2009 19:05:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752918AbZBXTF3 (ORCPT ); Tue, 24 Feb 2009 14:05:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752910AbZBXTF2 (ORCPT ); Tue, 24 Feb 2009 14:05:28 -0500 Received: from qb-out-0506.google.com ([72.14.204.226]:25265 "EHLO qb-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbZBXTF2 (ORCPT ); Tue, 24 Feb 2009 14:05:28 -0500 Received: by qb-out-0506.google.com with SMTP id q18so1622896qba.17 for ; Tue, 24 Feb 2009 11:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=zIrU0nG7UGgeVq/0DwdTKdDCQmv1XZjoGOTaZ1Pz4Fg=; b=QejWaZBWRqiPvWUdvB3g3v2uiQI4+85ocRQbL6YSKSSLCLsnrRUlBPlk8qkJMs16jX 0Skwdx4YADk/te+tlGE81dzJMyuSuFy4gpju7dHOVw22OP5jImsbE3S0VhL6NcU3F4ET OJUE1bjtbY6yeczqkM70OIGLr7wwRYuCLpRAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=pPfbpkNaNwMcSqufOdCtJGZ7da9FkjPWd/IbqZwdZULd0PQGU7bpLcSQfDJNlgLd2/ 4kKA9hjwUBdKVjvpSHDfurBFfXtCH3yJq+TK7yAqECZ4T92LxaNMDqxFEyzkyDhEWGP/ DImwlsRQdAvtc9vSNBiqMr+Y7d2atZVQ0QATA= MIME-Version: 1.0 Received: by 10.231.16.129 with SMTP id o1mr297956iba.47.1235502325251; Tue, 24 Feb 2009 11:05:25 -0800 (PST) Date: Tue, 24 Feb 2009 14:05:25 -0500 X-Google-Sender-Auth: d89d0f11f128bfc3 Message-ID: Subject: potential linking bug in recursive directory descent From: Fred Isaman To: linux-kbuild@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The pnfs tree base of of 2.6.29-rc5 uses the new find_last_bit function (defined in lib/find_last_bit.c) in a file in the fs/nfs directory. Myself and another developer (though no one else so far) get the following error during compile: Kernel: arch/x86/boot/bzImage is ready (#5) Building modules, stage 2. MODPOST 515 modules ERROR: "find_last_bit" [fs/nfs/nfs.ko] undefined! make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make: *** [sub-make] Error 2 Note that find_last_bit() is not used in any file in the fs directory. If I add it to any function that is EXPORT_SYMBOL'ed from the fs directory, suddenly the compile errors go away. (See the below patch for a more concrete example.) I am not sure what is going on, and why it only affects some developers, but it looks a lot like the kbuild system is deciding that the library does not need to be included at the fs directory level, so isn't including it in fs/nfs where it is needed. Thanks for any help. Fred From 4bd89543983640ab01c9b704d427f83dad3aa455 Mon Sep 17 00:00:00 2001 From: Fred Isaman Date: Fri, 20 Feb 2009 11:58:52 -0500 Subject: [PATCH 1/1] DEBUG: Need this to compile - what the heck? This looks suspiciously like a bug in the kbuild system, where the library include is not passed down to fs/nfs unless it is used by fs. Without this, I get the following error during linking: Kernel: arch/x86/boot/bzImage is ready (#5) Building modules, stage 2. MODPOST 515 modules ERROR: "find_last_bit" [fs/nfs/nfs.ko] undefined! make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make: *** [sub-make] Error 2 Signed-off-by: Fred Isaman --- fs/inode.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/inode.c b/fs/inode.c index 306faef..a4e29b3 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -226,6 +226,7 @@ EXPORT_SYMBOL(destroy_inode); */ void inode_init_once(struct inode *inode) { + find_last_bit((unsigned long *) inode, 5); memset(inode, 0, sizeof(*inode)); INIT_HLIST_NODE(&inode->i_hash); INIT_LIST_HEAD(&inode->i_dentry);