linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: linux-api@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
	Oleg Nesterov <onestero@redhat.com>,
	Stephane Eranian <eranian@googlemail.com>,
	Michael Kerrisk <mtk.manpages@googlemail.com>,
	Roland McGrath <roland@redhat.com>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Christoph Hellwig <hch@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: F_SETOWN_EX and F_GETLK64 conflict
Date: Sun, 04 Oct 2009 23:30:22 +0200	[thread overview]
Message-ID: <1254691822.21044.9.camel@laptop> (raw)
In-Reply-To: <Pine.LNX.4.64.0910041229300.20203@digraph.polyomino.org.uk>

On Sun, 2009-10-04 at 12:35 +0000, Joseph S. Myers wrote:
> In asm-generic/fcntl.h, F_SETOWN_EX and F_GETLK64 both have value 12, and 
> F_GETOWN_EX and F_SETLK64 both have value 13.  I don't see how this is 
> going to work correctly.  See 
> <http://sourceware.org/ml/libc-ports/2009-10/msg00013.html>.


Ugh,.. yeah, non obvious collision that.

How about something like:

---
 arch/alpha/include/asm/fcntl.h |    4 ++--
 include/asm-generic/fcntl.h    |   19 +++++++++++--------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/arch/alpha/include/asm/fcntl.h b/arch/alpha/include/asm/fcntl.h
index e42823e..73126e4 100644
--- a/arch/alpha/include/asm/fcntl.h
+++ b/arch/alpha/include/asm/fcntl.h
@@ -26,8 +26,8 @@
 #define F_GETOWN	6	/*  for sockets. */
 #define F_SETSIG	10	/*  for sockets. */
 #define F_GETSIG	11	/*  for sockets. */
-#define F_SETOWN_EX	12
-#define F_GETOWN_EX	13
+#define F_SETOWN_EX	15
+#define F_GETOWN_EX	16
 
 /* for posix fcntl() and lockf() */
 #define F_RDLCK		1
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index 0c3dd86..cd2d789 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -73,9 +73,18 @@
 #define F_SETSIG	10	/* for sockets. */
 #define F_GETSIG	11	/* for sockets. */
 #endif
+
+#ifndef CONFIG_64BIT
+#ifndef F_GETLK64
+#define F_GETLK64	12	/*  using 'struct flock64' */
+#define F_SETLK64	13
+#define F_SETLKW64	14
+#endif
+#endif
+
 #ifndef F_SETOWN_EX
-#define F_SETOWN_EX	12
-#define F_GETOWN_EX	13
+#define F_SETOWN_EX	15
+#define F_GETOWN_EX	16
 #endif
 
 #define F_OWNER_TID	0
@@ -139,12 +148,6 @@ struct flock {
 
 #ifndef CONFIG_64BIT
 
-#ifndef F_GETLK64
-#define F_GETLK64	12	/*  using 'struct flock64' */
-#define F_SETLK64	13
-#define F_SETLKW64	14
-#endif
-
 #ifndef HAVE_ARCH_STRUCT_FLOCK64
 #ifndef __ARCH_FLOCK64_PAD
 #define __ARCH_FLOCK64_PAD

       reply	other threads:[~2009-10-04 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0910041229300.20203@digraph.polyomino.org.uk>
2009-10-04 21:30 ` Peter Zijlstra [this message]
2009-10-29 17:03   ` F_SETOWN_EX and F_GETLK64 conflict Andreas Schwab
2009-10-30  3:21   ` Ulrich Drepper
2009-10-30  5:13   ` Stephen Rothwell
2009-10-30  5:29     ` Stephen Rothwell
     [not found]       ` <20091030162906.fbc1c40b.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-11-12 23:32         ` Stephen Rothwell
     [not found]           ` <20091113103257.1f4f6e12.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-11-14  7:01             ` [PATCH] fcntl: use architecture independent values for new fcntl operations Stephen Rothwell
     [not found]               ` <20091114180131.da95d2a1.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-11-14  9:45                 ` [PATCH v2] fcntl: Use consistent values for F_[GS]ETOWN_EX Stephen Rothwell

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=1254691822.21044.9.camel@laptop \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=eranian@googlemail.com \
    --cc=hch@infradead.org \
    --cc=joseph@codesourcery.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtk.manpages@googlemail.com \
    --cc=onestero@redhat.com \
    --cc=roland@redhat.com \
    --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).