[LinuxPPS] SLOW_WORK: Fix the CONFIG_MODULES=n case

gitweb.enneenne.com Git - linuxpps/rss log: David Howells <> webmaster at enneenne.com
Mon Dec 21 11:15:42 CET 2009


SLOW_WORK: Fix the CONFIG_MODULES=n case
    
    Commits 3d7a641 ("SLOW_WORK: Wait for outstanding work items belonging to a
    module to clear") introduced some code to make sure that all of a module's
    slow-work items were complete before that module was removed, and commit
    3bde31a ("SLOW_WORK: Allow a requeueable work item to sleep till the thread is
    needed") further extended that, breaking it in the process if CONFIG_MODULES=n:
    
        CC      kernel/slow-work.o
      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)
      make[1]: *** [kernel/slow-work.o] Error 1
    
    Fix this by:
    
     (1) Extracting the bits of slow_work_execute() that are contingent on
         CONFIG_MODULES, and the bits that should be, into inline functions and
         placing them into the #ifdef'd section that defines the relevant variables
         and adding stubs for moduleless kernels.  This allows the removal of some
         #ifdefs.
    
     (2) #ifdef'ing out the contents of slow_work_wait_for_items() in moduleless
         kernels.
    
    The four functions related to handling module unloading synchronisation (and
    their associated variables) could be offloaded into a separate .c file, but
    each function is only used once and three of them are tiny, so doing so would
    prevent them from being inlined.
    
    Reported-by: Ingo Molnar <mingo at elte.hu>
    Signed-off-by: David Howells <dhowells at redhat.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    

  * [[D][1][H][2]] kernel/slow-work.c

   [1]: http://gitweb.enneenne.com/?p=linuxpps;a=blobdiff;f=kernel/slow-work.c;fp=kernel/slow-work.c;h=b5c17f15f9deff2a8f025161f316c986b108224c;hp=da94f3c101af77985272b72861bca34db1c853aa;hb=fa1dae4906982b5d896c07613b1fe42456133b1c;hpb=6f054164322bc6c1233402b9ed6b40d4af39a98f (diff)
   [2]: http://gitweb.enneenne.com/?p=linuxpps;a=history;f=kernel/slow-work.c;h=fa1dae4906982b5d896c07613b1fe42456133b1c (history)

URL: http://gitweb.enneenne.com/?p=linuxpps;a=commitdiff;h=fa1dae4906982b5d896c07613b1fe42456133b1c



More information about the LinuxPPS mailing list