OBD_ALLOC(kernbuf, count + 1);
if (kernbuf == NULL)
GOTO(failed, rc = -ENOMEM);
- if (cfs_copy_from_user(kernbuf, buffer, count))
+ if (copy_from_user(kernbuf, buffer, count))
GOTO(failed, rc = -EFAULT);
/* Remove any extraneous bits from the upcall (e.g. linefeeds) */
if (param == NULL)
return -ENOMEM;
- if (cfs_copy_from_user(param, buffer, size)) {
+ if (copy_from_user(param, buffer, size)) {
CERROR("%s: bad identity data\n", mdt_obd_name(mdt));
GOTO(out, rc = -EFAULT);
}
* bytes into kbuf, to ensure that the string is NUL-terminated.
* UUID_MAX should include a trailing NUL already.
*/
- if (cfs_copy_from_user(kbuf, buffer,
- min_t(unsigned long, BUFLEN - 1, count))) {
+ if (copy_from_user(kbuf, buffer,
+ min_t(unsigned long, BUFLEN - 1, count))) {
count = -EFAULT;
goto out;
}
errmsg = "string too long";
GOTO(failed, rc = -EINVAL);
}
- if (cfs_copy_from_user(kernbuf, buffer, count)) {
+ if (copy_from_user(kernbuf, buffer, count)) {
errmsg = "bad address";
GOTO(failed, rc = -EFAULT);
}
errmsg = "no memory";
GOTO(failed, rc = -ENOMEM);
}
- if (cfs_copy_from_user(kernbuf, buffer, count)) {
+ if (copy_from_user(kernbuf, buffer, count)) {
errmsg = "bad address";
GOTO(failed, rc = -EFAULT);
}
if (count > (sizeof(kernbuf) - 1))
return -EINVAL;
- if (cfs_copy_from_user(kernbuf, buffer, count))
+ if (copy_from_user(kernbuf, buffer, count))
return -EFAULT;
kernbuf[count] = '\0';
* bytes into kbuf, to ensure that the string is NUL-terminated.
* UUID_MAX should include a trailing NUL already.
*/
- if (cfs_copy_from_user(kbuf, buffer,
- min_t(unsigned long, UUID_MAX - 1, count))) {
+ if (copy_from_user(kbuf, buffer,
+ min_t(unsigned long, UUID_MAX - 1, count))) {
count = -EFAULT;
goto out;
}