aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-04 13:47:16 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-04 14:08:09 -0400
commitbf5fc4028ef751904a114ffc4b5d2cd9f0233142 (patch)
tree70c9aea55244ec155f6981a685b730bd6de0bc85 /fs/nfs
parentd69ee9b85541a69a1092f5da675bd23256dc62af (diff)
NFS: Fix O_DIRECT compile warnings
Fix the following compile warnings: fs/nfs/direct.c: In function 'nfs_direct_read_schedule_segment': fs/nfs/direct.c:325:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:325:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:325:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:352:27: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c: In function 'nfs_direct_write_schedule_segment': fs/nfs/direct.c:622:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:622:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:622:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:650:27: warning: comparison of distinct pointer types lacks a cast [enabled by default] Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Fred Isaman <iisaman@netapp.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/direct.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index aab3016c437c..dca9c8143009 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -322,7 +322,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
322 int i; 322 int i;
323 323
324 pgbase = user_addr & ~PAGE_MASK; 324 pgbase = user_addr & ~PAGE_MASK;
325 bytes = min(max(rsize, PAGE_SIZE), count); 325 bytes = min(max_t(size_t, rsize, PAGE_SIZE), count);
326 326
327 result = -ENOMEM; 327 result = -ENOMEM;
328 npages = nfs_page_array_len(pgbase, bytes); 328 npages = nfs_page_array_len(pgbase, bytes);
@@ -349,7 +349,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de
349 349
350 for (i = 0; i < npages; i++) { 350 for (i = 0; i < npages; i++) {
351 struct nfs_page *req; 351 struct nfs_page *req;
352 unsigned int req_len = min(bytes, PAGE_SIZE - pgbase); 352 unsigned int req_len = min_t(size_t, bytes, PAGE_SIZE - pgbase);
353 /* XXX do we need to do the eof zeroing found in async_filler? */ 353 /* XXX do we need to do the eof zeroing found in async_filler? */
354 req = nfs_create_request(dreq->ctx, dreq->inode, 354 req = nfs_create_request(dreq->ctx, dreq->inode,
355 pagevec[i], 355 pagevec[i],
@@ -619,7 +619,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d
619 int i; 619 int i;
620 620
621 pgbase = user_addr & ~PAGE_MASK; 621 pgbase = user_addr & ~PAGE_MASK;
622 bytes = min(max(wsize, PAGE_SIZE), count); 622 bytes = min(max_t(size_t, wsize, PAGE_SIZE), count);
623 623
624 result = -ENOMEM; 624 result = -ENOMEM;
625 npages = nfs_page_array_len(pgbase, bytes); 625 npages = nfs_page_array_len(pgbase, bytes);
@@ -647,7 +647,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_pageio_descriptor *d
647 647
648 for (i = 0; i < npages; i++) { 648 for (i = 0; i < npages; i++) {
649 struct nfs_page *req; 649 struct nfs_page *req;
650 unsigned int req_len = min(bytes, PAGE_SIZE - pgbase); 650 unsigned int req_len = min_t(size_t, bytes, PAGE_SIZE - pgbase);
651 651
652 req = nfs_create_request(dreq->ctx, dreq->inode, 652 req = nfs_create_request(dreq->ctx, dreq->inode,
653 pagevec[i], 653 pagevec[i],