Lines Matching defs:len
187 ssize_t len = min_t(size_t, iov_iter_count(iter), PAGE_SIZE);
195 buf = kmalloc(len, GFP_KERNEL);
205 len = -ENODEV;
213 len = ops->read(of, buf, len, iocb->ki_pos);
215 len = -EINVAL;
220 if (len < 0)
223 if (copy_to_iter(buf, len, iter) != len) {
224 len = -EFAULT;
228 iocb->ki_pos += len;
235 return len;
258 ssize_t len = iov_iter_count(iter);
263 if (len > of->atomic_write_len)
266 len = min_t(size_t, len, PAGE_SIZE);
273 buf = kmalloc(len + 1, GFP_KERNEL);
277 if (copy_from_iter(buf, len, iter) != len) {
278 len = -EFAULT;
281 buf[len] = '\0'; /* guarantee string termination */
290 len = -ENODEV;
296 len = ops->write(of, buf, len, iocb->ki_pos);
298 len = -EINVAL;
303 if (len > 0)
304 iocb->ki_pos += len;
311 return len;
374 void *buf, int len, int write)
388 ret = of->vm_ops->access(vma, addr, buf, len, write);
670 int len = of->atomic_write_len ?: PAGE_SIZE;
671 of->prealloc_buf = kmalloc(len + 1, GFP_KERNEL);