x86: switch 32bit csum_and_copy_to_user() to user_access_{begin,end}()
[linux-2.6-microblaze.git] / arch / x86 / include / asm / checksum_32.h
index 2487b7f..11624c8 100644 (file)
@@ -176,7 +176,6 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
 /*
  *     Copy and checksum to user
  */
-#define HAVE_CSUM_COPY_USER
 static inline __wsum csum_and_copy_to_user(const void *src,
                                           void __user *dst,
                                           int len, __wsum sum,
@@ -185,11 +184,10 @@ static inline __wsum csum_and_copy_to_user(const void *src,
        __wsum ret;
 
        might_sleep();
-       if (access_ok(dst, len)) {
-               stac();
+       if (user_access_begin(dst, len)) {
                ret = csum_partial_copy_generic(src, (__force void *)dst,
                                                len, sum, NULL, err_ptr);
-               clac();
+               user_access_end();
                return ret;
        }