Lines Matching defs:len
224 ssize_t len = min_t(size_t, iov_iter_count(iter), PAGE_SIZE);
232 buf = kmalloc(len, GFP_KERNEL);
242 len = -ENODEV;
251 len = ops->read(of, buf, len, iocb->ki_pos);
253 len = -EINVAL;
258 if (len < 0)
261 if (copy_to_iter(buf, len, iter) != len) {
262 len = -EFAULT;
266 iocb->ki_pos += len;
273 return len;
296 ssize_t len = iov_iter_count(iter);
301 if (len > of->atomic_write_len)
304 len = min_t(size_t, len, PAGE_SIZE);
311 buf = kmalloc(len + 1, GFP_KERNEL);
315 if (copy_from_iter(buf, len, iter) != len) {
316 len = -EFAULT;
319 buf[len] = '\0'; /* guarantee string termination */
328 len = -ENODEV;
334 len = ops->write(of, buf, len, iocb->ki_pos);
336 len = -EINVAL;
341 if (len > 0)
342 iocb->ki_pos += len;
349 return len;
412 void *buf, int len, int write)
426 ret = of->vm_ops->access(vma, addr, buf, len, write);
712 int len = of->atomic_write_len ?: PAGE_SIZE;
713 of->prealloc_buf = kmalloc(len + 1, GFP_KERNEL);