Messages in this thread Patch in this message | | | Date | Fri, 11 Apr 2003 11:06:47 +1000 | From | Stephen Rothwell <> | Subject | [PATCH][COMPAT] Allow for architectures to override {get,put}_compat_flock64 |
| |
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, Stephen Rothwell sfr@canb.auug.org.au 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 +++ 2.5.67-041008-compat.2/fs/compat.c 2003-04-10 13:40:43.000000000 +1000 @@ -154,6 +154,7 @@ 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)) || @@ -165,7 +166,9 @@ 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)) || @@ -177,6 +180,7 @@ 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 the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |