public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs-masters@oss.sgi.com, Ben Myers <bpm@sgi.com>,
	Alex Elder <elder@kernel.org>,
	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	[thread overview]
Message-ID: <4f709c9a30285611d@agluck-desktop.sc.intel.com> (raw)

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 <tony.luck@intel.com>

---

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);

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2012-03-26 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 16:43 Luck, Tony [this message]
2012-03-26 17:12 ` [PATCH] Fix xfs build error on ia64 (mismatch section for xfs_qm_exit()) Ben Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f709c9a30285611d@agluck-desktop.sc.intel.com \
    --to=tony.luck@intel.com \
    --cc=bpm@sgi.com \
    --cc=elder@kernel.org \
    --cc=hch@infradead.org \
    --cc=xfs-masters@oss.sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox