Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308588
b: refs/heads/master
c: bf5fc40
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 4, 2012
1 parent 07b30d9 commit cccf0f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d69ee9b85541a69a1092f5da675bd23256dc62af
refs/heads/master: bf5fc4028ef751904a114ffc4b5d2cd9f0233142
8 changes: 4 additions & 4 deletions trunk/fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
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);
Expand All @@ -349,7 +349,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de

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],
Expand Down Expand Up @@ -619,7 +619,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d
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);
Expand Down Expand Up @@ -647,7 +647,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d

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],
Expand Down

0 comments on commit cccf0f0

Please sign in to comment.