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.
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)) ||
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)) ||
return -EFAULT;
return 0;
}
+#endif
extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);