uaccess: Selectively open read or write user access
[linux-2.6-block.git] / lib / strnlen_user.c
index 41670d4a5816530d7b948fe29f0fad20a44ec2ed..1616710b8a82cf93f3ad4f1fa41f6ea35167dae1 100644 (file)
@@ -109,9 +109,9 @@ long strnlen_user(const char __user *str, long count)
                if (max > count)
                        max = count;
 
-               if (user_access_begin(str, max)) {
+               if (user_read_access_begin(str, max)) {
                        retval = do_strnlen_user(str, count, max);
-                       user_access_end();
+                       user_read_access_end();
                        return retval;
                }
        }