From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: [PATCH] slow-work: Fix build bug in the !CONFIG_MODULES case Date: Tue, 1 Dec 2009 07:56:05 +0100 Message-ID: <20091201065605.GA5361@elte.hu> References: <13590.1258714119@redhat.com> <17633.1258758083@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Transfer-Encoding: QUOTED-PRINTABLE 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 To: David Howells Return-path: Received: from mx3.mail.elte.hu ([157.181.1.138]:41116 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752702AbZLAG4R (ORCPT ); Tue, 1 Dec 2009 01:56:17 -0500 Content-Disposition: inline In-Reply-To: <17633.1258758083@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: * David Howells wrote: > Hi Linus, >=20 > Could you pull the attached patches before 2.6.32 please? I've added= three > one-liner patches to fix some silly bugs. >=20 > For the most part these patches are bug fixes for the slow-work, FS-C= ache 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= =20 on x86 (and all other architectures i suspect): kernel/slow-work.c: In function =E2=80=98slow_work_execute=E2=80=99: kernel/slow-work.c:313: error: =E2=80=98slow_work_thread_processing=E2=80= =99 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 =E2=80=98slow_work_wait_for_items=E2=80= =99: kernel/slow-work.c:950: error: =E2=80=98slow_work_unreg_sync_lock=E2=80= =99 undeclared (first use in this function) kernel/slow-work.c:951: error: =E2=80=98slow_work_unreg_wq=E2=80=99 und= eclared (first use in this function) kernel/slow-work.c:961: error: =E2=80=98slow_work_unreg_work_item=E2=80= =99 undeclared (first use in this function) kernel/slow-work.c:974: error: =E2=80=98slow_work_unreg_module=E2=80=99= undeclared (first use in this function) kernel/slow-work.c:977: error: =E2=80=98slow_work_thread_processing=E2=80= =99 undeclared (first use in this function) Commit 3bde31a ("SLOW_WORK: Allow a requeueable work item to sleep till= =20 the thread is needed") broke the !CONFIG_MODULES build by relying on=20 variables that are only available (and only make sense) with module=20 support enabled. Fix it. Note, to fix it in a minimal way for .32 i've simply extended the=20 existing #ifdef's. In v2.6.33 a cleaner change would be to move the=20 whole wait-for-modules block into a separate slow-work-wait-modules.c=20 file or so - that will allow the removal of 6 #ifdefs. Thanks, Ingo ---------------------------> =46rom ac73995e9be78ba5dcf3db843d7e04295decabcd Mon Sep 17 00:00:00 200= 1 =46rom: Ingo Molnar 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 Cc: Linus Torvalds Cc: Andrew Morton Signed-off-by: Ingo Molnar --- 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] =3D NULL; +#endif return true; } =20 @@ -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) =20 remove_wait_queue(&slow_work_unreg_wq, &myself); mutex_unlock(&slow_work_unreg_sync_lock); +#endif } =20 /** -- 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