From: Ingo Molnar <mingo@elte.hu>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, akpm@linux-foundation.org, steved@redhat.com,
jens.axboe@oracle.com, linux-cachefs@redhat.com,
nfsv4@linux-nfs.org, linux-fsdevel@vger.kernel.org,
cluster-devel@redhat.com, linux-kernel@vger.kernel.org,
linux-cifs-client@lists.samba.org
Subject: [PATCH] slow-work: Fix build bug in the !CONFIG_MODULES case
Date: Tue, 1 Dec 2009 07:56:05 +0100 [thread overview]
Message-ID: <20091201065605.GA5361@elte.hu> (raw)
In-Reply-To: <17633.1258758083@redhat.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 3778 bytes --]
* David Howells <dhowells@redhat.com> wrote:
> Hi Linus,
>
> Could you pull the attached patches before 2.6.32 please? I've added three
> one-liner patches to fix some silly bugs.
>
> For the most part these patches are bug fixes for the slow-work, FS-Cache and
> CacheFiles facilities, with a few patches to produce better debugging
> information, and a couple of patches to slow work from Jens that all the rest
> are built on top of.
these slow-work changes have introduced a new !CONFIG_MODULES build bug
on x86 (and all other architectures i suspect):
kernel/slow-work.c: In function ‘slow_work_execute’:
kernel/slow-work.c:313: error: ‘slow_work_thread_processing’ undeclared (first use in this function)
kernel/slow-work.c:313: error: (Each undeclared identifier is reported only once
kernel/slow-work.c:313: error: for each function it appears in.)
kernel/slow-work.c: In function ‘slow_work_wait_for_items’:
kernel/slow-work.c:950: error: ‘slow_work_unreg_sync_lock’ undeclared (first use in this function)
kernel/slow-work.c:951: error: ‘slow_work_unreg_wq’ undeclared (first use in this function)
kernel/slow-work.c:961: error: ‘slow_work_unreg_work_item’ undeclared (first use in this function)
kernel/slow-work.c:974: error: ‘slow_work_unreg_module’ undeclared (first use in this function)
kernel/slow-work.c:977: error: ‘slow_work_thread_processing’ undeclared (first use in this function)
Commit 3bde31a ("SLOW_WORK: Allow a requeueable work item to sleep till
the thread is needed") broke the !CONFIG_MODULES build by relying on
variables that are only available (and only make sense) with module
support enabled. Fix it.
Note, to fix it in a minimal way for .32 i've simply extended the
existing #ifdef's. In v2.6.33 a cleaner change would be to move the
whole wait-for-modules block into a separate slow-work-wait-modules.c
file or so - that will allow the removal of 6 #ifdefs.
Thanks,
Ingo
--------------------------->
From ac73995e9be78ba5dcf3db843d7e04295decabcd Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 1 Dec 2009 07:47:52 +0100
Subject: [PATCH] slow-work: Fix build bug in the !CONFIG_MODULES case
Commit 3bde31a ("SLOW_WORK: Allow a requeueable work item to sleep till
the thread is needed") broke the !CONFIG_MODULES build by relying on
variables that are only available (and only make sense) with module
support enabled. Fix it.
Cc: David Howells <dhowells@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/slow-work.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/slow-work.c b/kernel/slow-work.c
index da94f3c..5bae807 100644
--- a/kernel/slow-work.c
+++ b/kernel/slow-work.c
@@ -310,7 +310,9 @@ auto_requeue:
else
list_add_tail(&work->link, &slow_work_queue);
spin_unlock_irq(&slow_work_queue_lock);
+#ifdef CONFIG_MODULES
slow_work_thread_processing[id] = NULL;
+#endif
return true;
}
@@ -943,6 +945,7 @@ EXPORT_SYMBOL(slow_work_register_user);
*/
static void slow_work_wait_for_items(struct module *module)
{
+#ifdef CONFIG_MODULES
DECLARE_WAITQUEUE(myself, current);
struct slow_work *work;
int loop;
@@ -989,6 +992,7 @@ static void slow_work_wait_for_items(struct module *module)
remove_wait_queue(&slow_work_unreg_wq, &myself);
mutex_unlock(&slow_work_unreg_sync_lock);
+#endif
}
/**
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-12-01 6:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 10:48 [GIT PULL] Fix bugs in Slow-work, FS-Cache and CacheFiles David Howells
2009-11-20 23:01 ` [GIT PULL v2] " David Howells
2009-12-01 6:56 ` Ingo Molnar [this message]
2009-12-01 7:32 ` [PATCH] slow-work: Fix build bug in the !CONFIG_MODULES case Stephen Rothwell
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=20091201065605.GA5361@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=cluster-devel@redhat.com \
--cc=dhowells@redhat.com \
--cc=jens.axboe@oracle.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=steved@redhat.com \
--cc=torvalds@osdl.org \
/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;
as well as URLs for NNTP newsgroup(s).