linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: akpm@linux-foundation.org
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	fengguang.wu@intel.com, davem@davemloft.net, eparis@redhat.com,
	hch@infradead.org, jamie@shareable.org, rdreier@cisco.com,
	schwab@linux-m68k.org, sfr@canb.auug.org.au
Subject: Re: [patch 2/5] vfs: O_* bit numbers uniqueness check
Date: Thu, 26 Aug 2010 18:22:39 -0500	[thread overview]
Message-ID: <1282864959.8133.67.camel@mulgrave.site> (raw)
In-Reply-To: <201007202229.o6KMTkEp021831@imap1.linux-foundation.org>

On Tue, 2010-07-20 at 15:29 -0700, akpm@linux-foundation.org wrote:
> From: Wu Fengguang <fengguang.wu@intel.com>
> 
> The O_* bit numbers are defined in 20+ arch/*, and can silently overlap. 
> Add a compile time check to ensure the uniqueness as suggested by David
> Miller.

Can we get this reverted or fixed?  It's causing the parisc compiles to
fail.  The reason is O_NONBLOCK on parisc has a dual value:

#define O_NONBLOCK	000200004 /* HPUX has separate NDELAY & NONBLOCK */

The fix would be to take O_NONBLOCK out.

James

---

diff --git a/fs/fcntl.c b/fs/fcntl.c
index 6769fd0..aeb02aa 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -770,10 +770,11 @@ EXPORT_SYMBOL(kill_fasync);
 static int __init fcntl_init(void)
 {
 	/* please add new bits here to ensure allocation uniqueness */
-	BUILD_BUG_ON(19 - 1 /* for O_RDONLY being 0 */ != HWEIGHT32(
+	BUILD_BUG_ON(18 - 1 /* for O_RDONLY being 0 */ != HWEIGHT32(
 		O_RDONLY	| O_WRONLY	| O_RDWR	|
 		O_CREAT		| O_EXCL	| O_NOCTTY	|
-		O_TRUNC		| O_APPEND	| O_NONBLOCK	|
+		/* remove O_NONBLOCK it's a two bit define on parisc */
+		O_TRUNC		| O_APPEND	| /* O_NONBLOCK	| */
 		__O_SYNC	| O_DSYNC	| FASYNC	|
 		O_DIRECT	| O_LARGEFILE	| O_DIRECTORY	|
 		O_NOFOLLOW	| O_NOATIME	| O_CLOEXEC	|



  reply	other threads:[~2010-08-26 23:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 22:29 [patch 2/5] vfs: O_* bit numbers uniqueness check akpm
2010-08-26 23:22 ` James Bottomley [this message]
2010-08-27  1:27   ` Jamie Lokier
2010-08-27  5:53     ` James Bottomley
2010-09-04  1:22       ` [PATCH] vfs: take O_NONBLOCK out of the O_* uniqueness test Wu Fengguang
  -- strict thread matches above, loose matches on Subject: below --
2010-05-24 19:24 [patch 2/5] vfs: O_* bit numbers uniqueness check akpm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282864959.8133.67.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=eparis@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=hch@infradead.org \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=schwab@linux-m68k.org \
    --cc=sfr@canb.auug.org.au \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).