linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] QUOTA: Have <linux/quota.h> include <linux/rwsem.h> explicitly.
@ 2007-02-04 15:46 Robert P. J. Day
  2007-02-05  9:47 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2007-02-04 15:46 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, jack


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

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  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

http://www.fsdev.dreamhosters.com/wiki/index.php?title=Main_Page
========================================================================

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] QUOTA: Have <linux/quota.h> include <linux/rwsem.h> explicitly.
  2007-02-04 15:46 [PATCH] QUOTA: Have <linux/quota.h> include <linux/rwsem.h> explicitly Robert P. J. Day
@ 2007-02-05  9:47 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2007-02-05  9:47 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Andrew Morton

On Sun 04-02-07 10:46:33, Robert P. J. Day wrote:
> 
>   Since quota.h declares a R/W semaphore, it should include rwsem.h
> explicitly.
> 
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
  Acked-by: Jan Kara <jack@suse.cz>

> ---
> 
>   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
> 
> http://www.fsdev.dreamhosters.com/wiki/index.php?title=Main_Page
> ========================================================================

										Honza

-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-05 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-04 15:46 [PATCH] QUOTA: Have <linux/quota.h> include <linux/rwsem.h> explicitly Robert P. J. Day
2007-02-05  9:47 ` Jan Kara

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).