X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.4.0-r929098 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q2QGh7qG032703 for ; Mon, 26 Mar 2012 11:43:08 -0500 X-ASG-Debug-ID: 1332780186-04bdf04aa0554ca0001-7TOuyN Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by cuda.sgi.com with ESMTP id fwsK6jy1WNFQLs9z; Mon, 26 Mar 2012 09:43:06 -0700 (PDT) X-Barracuda-Envelope-From: tony.luck@intel.com X-Barracuda-Apparent-Source-IP: 134.134.136.20 X-Barracuda-IPDD: Level2 [intel.com/134.134.136.20] X-Barracuda-IPDD: Level2 [intel.com/134.134.136.20] Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 26 Mar 2012 09:43:06 -0700 X-Barracuda-IPDD: Level2 [intel.com/134.134.136.20] X-Barracuda-IPDD: Level2 [intel.com/134.134.136.20] X-Barracuda-IPDD: Level2 [intel.com/134.134.136.20] X-Barracuda-IPDD: Level2 [intel.com/134.134.136.20] X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,351,1309762800"; d="scan'208";a="125258650" Received: from agluck-desktop.sc.intel.com ([10.3.52.68]) by orsmga002.jf.intel.com with SMTP; 26 Mar 2012 09:43:06 -0700 From: "Luck, Tony" To: Christoph Hellwig Cc: Ben Myers , Alex Elder , xfs-masters@oss.sgi.com, xfs@oss.sgi.com Subject: [PATCH] Fix xfs build error on ia64 (mismatch section for xfs_qm_exit()) Date: Mon, 26 Mar 2012 09:43:06 -0700 X-ASG-Orig-Subj: [PATCH] Fix xfs build error on ia64 (mismatch section for xfs_qm_exit()) Message-Id: <4f709c9a30285611d@agluck-desktop.sc.intel.com> X-Barracuda-Connect: mga02.intel.com[134.134.136.20] X-Barracuda-Start-Time: 1332780186 X-Barracuda-URL: http://192.48.157.11:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com ia64 deletes __exit section during the final link stage of vmlinux. This means that code should not call __exit functions in modules that can be built in to the kernel. Building with CONFIG_DEBUG_SECTION_MISMATCH=y we see these build messages: WARNING: vmlinux.o(.init.text+0x22462): Section mismatch in reference from the function init_xfs_fs() to the function .exit.text:xfs_qm_exit() The function __init init_xfs_fs() references a function __exit xfs_qm_exit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of xfs_qm_exit() so it may be used outside an exit section. ... `xfs_qm_exit' referenced in section `.init.text' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o make: *** [.tmp_vmlinux1] Error 1 Introduced in commit a05931ceb0160deadbd7798d60d01b17f2d81b09 xfs: remove the global xfs_Gqm structure Signed-off-by: Tony Luck --- diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 4be16a0..1155208 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c @@ -1065,7 +1065,7 @@ out: return -ENOMEM; } -void __exit +void xfs_qm_exit(void) { kmem_zone_destroy(xfs_qm_dqtrxzone);