Skip to content

Commit

Permalink
Add semaphore.h to kernel_lock.c
Browse files Browse the repository at this point in the history
kernel_lock.c uses DECLARE_MUTEX, up() and down() without explicitly
including asm/semaphore.h.  This is fragile and leaves it vulnerable
to breakage during header reorganisations.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
  • Loading branch information
Matthew Wilcox authored and Matthew Wilcox committed Apr 17, 2008
1 parent 8b91de2 commit e48b3de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/kernel_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/smp_lock.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <asm/semaphore.h>

/*
* The 'big kernel semaphore'
Expand Down

0 comments on commit e48b3de

Please sign in to comment.