[COMPAT] Allow for architectures to override {get,put}_compat_flock64

[COMPAT] Allow for architectures to override {get,put}_compat_flock64

Post by Stephen Rothwel » Sat, 12 Apr 2003 03:20:05



Hi Linus,

This is a small patch to allow 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.
(Dave Miller would like these API's renamed, but that is another patch).

Please apply.

--
Cheers,

http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.67-041008-compat.1/fs/compat.c 2.5.67-041008-compat.2/fs/compat.c
--- 2.5.67-041008-compat.1/fs/compat.c  2003-03-25 11:13:15.000000000 +1100

        return 0;
 }

+#ifndef HAVE_ARCH_GET_COMPAT_FLOCK64
 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)
 {

                return -EFAULT;
        return 0;
 }
+#endif

 extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/