]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Allow for architectures to override
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 26 May 2003 10:00:07 +0000 (03:00 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Mon, 26 May 2003 10:00:07 +0000 (03:00 -0700)
From:  Stephen Rothwell <sfr@canb.auug.org.au>

  This allows some architecture to override the generic implementations
  on {get,put}_compat_flock64 as some of them (ia64 and maybe x86_64)
  will take alignment faults when accessing the loff_t members of struct
  compat_flock64.

  Requested by David Mosberger, modified by Dave Miller.

fs/compat.c

index 89e58e2f720d200b844504ab468f1e9312f83bf7..832fc6042d814e52dc0f96fc37324274a4dabcf4 100644 (file)
@@ -378,6 +378,7 @@ static int put_compat_flock(struct flock *kfl, struct compat_flock *ufl)
        return 0;
 }
 
+#ifndef HAVE_ARCH_GET_COMPAT_FLOCK64
 static int get_compat_flock64(struct flock *kfl, struct compat_flock64 *ufl)
 {
        if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)) ||
@@ -389,7 +390,9 @@ static int get_compat_flock64(struct flock *kfl, struct compat_flock64 *ufl)
                return -EFAULT;
        return 0;
 }
+#endif
 
+#ifndef HAVE_ARCH_PUT_COMPAT_FLOCK64
 static int put_compat_flock64(struct flock *kfl, struct compat_flock64 *ufl)
 {
        if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)) ||
@@ -401,6 +404,7 @@ static int put_compat_flock64(struct flock *kfl, struct compat_flock64 *ufl)
                return -EFAULT;
        return 0;
 }
+#endif
 
 extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);