Lines Matching refs:count
695 cache_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos) in cache_read() argument
702 if (count == 0) in cache_read()
734 if (rp->offset + count > rq->len) in cache_read()
735 count = rq->len - rp->offset; in cache_read()
737 if (copy_to_user(buf, rq->buf + rp->offset, count)) in cache_read()
739 rp->offset += count; in cache_read()
766 return err ? err : count; in cache_read()
772 cache_write(struct file *filp, const char __user *buf, size_t count, in cache_write() argument
778 if (count == 0) in cache_write()
780 if (count >= sizeof(write_buf)) in cache_write()
785 if (copy_from_user(write_buf, buf, count)) { in cache_write()
789 write_buf[count] = '\0'; in cache_write()
791 err = cd->cache_parse(cd, write_buf, count); in cache_write()
796 return err ? err : count; in cache_write()
1270 size_t count, loff_t *ppos) in read_flush() argument
1282 if (len > count) in read_flush()
1283 len = count; in read_flush()
1291 size_t count, loff_t *ppos) in write_flush() argument
1297 if (*ppos || count > sizeof(tbuf)-1) in write_flush()
1299 if (copy_from_user(tbuf, buf, count)) in write_flush()
1301 tbuf[count] = 0; in write_flush()
1310 *ppos += count; in write_flush()
1311 return count; in write_flush()