Skip to content

Commit

Permalink
alpha: fix F_SETOWN_EX and F_GETLK64 conflict
Browse files Browse the repository at this point in the history
Fix a bug in

    commit ba0a6c9
    Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
    AuthorDate: Wed Sep 23 15:57:03 2009 -0700
    Commit:     Linus Torvalds <torvalds@linux-foundation.org>
    CommitDate: Thu Sep 24 07:21:01 2009 -0700

        fcntl: add F_[SG]ETOWN_EX

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.

Reported-by: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Andreas Schwab <schwab@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Peter Zijlstra authored and torvalds committed Nov 12, 2009
1 parent e00e431 commit 71ccb83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions arch/alpha/include/asm/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 11 additions & 8 deletions include/asm-generic/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 71ccb83

Please sign in to comment.