int i;
pgbase = user_addr & ~PAGE_MASK;
- bytes = min(max(rsize, PAGE_SIZE), count);
+ bytes = min(max_t(size_t, rsize, PAGE_SIZE), count);
result = -ENOMEM;
npages = nfs_page_array_len(pgbase, bytes);
for (i = 0; i < npages; i++) {
struct nfs_page *req;
- unsigned int req_len = min(bytes, PAGE_SIZE - pgbase);
+ unsigned int req_len = min_t(size_t, bytes, PAGE_SIZE - pgbase);
/* XXX do we need to do the eof zeroing found in async_filler? */
req = nfs_create_request(dreq->ctx, dreq->inode,
pagevec[i],
int i;
pgbase = user_addr & ~PAGE_MASK;
- bytes = min(max(wsize, PAGE_SIZE), count);
+ bytes = min(max_t(size_t, wsize, PAGE_SIZE), count);
result = -ENOMEM;
npages = nfs_page_array_len(pgbase, bytes);
for (i = 0; i < npages; i++) {
struct nfs_page *req;
- unsigned int req_len = min(bytes, PAGE_SIZE - pgbase);
+ unsigned int req_len = min_t(size_t, bytes, PAGE_SIZE - pgbase);
req = nfs_create_request(dreq->ctx, dreq->inode,
pagevec[i],