[lkml]   [2007]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] QUOTA: Have <linux/quota.h> include <linux/rwsem.h> explicitly.

Since quota.h declares a R/W semaphore, it should include rwsem.h

Signed-off-by: Robert P. J. Day <>


No, this doesn't fix an *existing* problem, but it's necessary for
an upcoming patch which will remove all includes of <linux/rwsem.h>
from all the semaphore.h files.

As I read it, since R/W semaphores have their own header file,
there's no rationale for the regular semaphore header files to have
that include statement, so any header file that's been happily picking
up the rwsem header file by accident (via semaphore.h) should be fixed
this way.

quota.h appears to be the only file that has this issue building on
x86 with "make allyesconfig".

diff --git a/include/linux/quota.h b/include/linux/quota.h
index b8fbf26..77db80a 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -132,6 +132,7 @@ struct if_dqinfo {

#ifdef __KERNEL__
#include <linux/spinlock.h>
+#include <linux/rwsem.h>
#include <linux/mutex.h>

#include <linux/dqblk_xfs.h>
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2007-02-04 16:51    [W:0.036 / U:20.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site