diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-04-17 17:22:13 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-05-01 01:17:09 -0400 |
commit | ca52fec152282ef73e5e882b847b36b1febbb1c6 (patch) | |
tree | 8eb28f127a04b83af3abdfbf3d97c630e1668986 /fs | |
parent | 724c439c204b12a3537b71289fb4c0a42c3aa566 (diff) |
NFS: Use pgoff_t in structures and functions that pass page cache offsets
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/pagelist.c | 4 | ||||
-rw-r--r-- | fs/nfs/write.c | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 096efd73eb4c..d846d39a31ef 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -383,12 +383,12 @@ void nfs_pageio_complete(struct nfs_pageio_descriptor *desc) | |||
383 | * You must be holding the inode's req_lock when calling this function | 383 | * You must be holding the inode's req_lock when calling this function |
384 | */ | 384 | */ |
385 | int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, | 385 | int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, |
386 | struct list_head *dst, unsigned long idx_start, | 386 | struct list_head *dst, pgoff_t idx_start, |
387 | unsigned int npages) | 387 | unsigned int npages) |
388 | { | 388 | { |
389 | struct nfs_page *pgvec[NFS_SCAN_MAXENTRIES]; | 389 | struct nfs_page *pgvec[NFS_SCAN_MAXENTRIES]; |
390 | struct nfs_page *req; | 390 | struct nfs_page *req; |
391 | unsigned long idx_end; | 391 | pgoff_t idx_end; |
392 | int found, i; | 392 | int found, i; |
393 | int res; | 393 | int res; |
394 | 394 | ||
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 424c4cea1208..5d44b8bd1070 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -139,7 +139,7 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c | |||
139 | { | 139 | { |
140 | struct inode *inode = page->mapping->host; | 140 | struct inode *inode = page->mapping->host; |
141 | loff_t end, i_size = i_size_read(inode); | 141 | loff_t end, i_size = i_size_read(inode); |
142 | unsigned long end_index = (i_size - 1) >> PAGE_CACHE_SHIFT; | 142 | pgoff_t end_index = (i_size - 1) >> PAGE_CACHE_SHIFT; |
143 | 143 | ||
144 | if (i_size > 0 && page->index < end_index) | 144 | if (i_size > 0 && page->index < end_index) |
145 | return; | 145 | return; |
@@ -511,11 +511,11 @@ int nfs_reschedule_unstable_write(struct nfs_page *req) | |||
511 | * | 511 | * |
512 | * Interruptible by signals only if mounted with intr flag. | 512 | * Interruptible by signals only if mounted with intr flag. |
513 | */ | 513 | */ |
514 | static int nfs_wait_on_requests_locked(struct inode *inode, unsigned long idx_start, unsigned int npages) | 514 | static int nfs_wait_on_requests_locked(struct inode *inode, pgoff_t idx_start, unsigned int npages) |
515 | { | 515 | { |
516 | struct nfs_inode *nfsi = NFS_I(inode); | 516 | struct nfs_inode *nfsi = NFS_I(inode); |
517 | struct nfs_page *req; | 517 | struct nfs_page *req; |
518 | unsigned long idx_end, next; | 518 | pgoff_t idx_end, next; |
519 | unsigned int res = 0; | 519 | unsigned int res = 0; |
520 | int error; | 520 | int error; |
521 | 521 | ||
@@ -570,7 +570,7 @@ static void nfs_cancel_commit_list(struct list_head *head) | |||
570 | * The requests are *not* checked to ensure that they form a contiguous set. | 570 | * The requests are *not* checked to ensure that they form a contiguous set. |
571 | */ | 571 | */ |
572 | static int | 572 | static int |
573 | nfs_scan_commit(struct inode *inode, struct list_head *dst, unsigned long idx_start, unsigned int npages) | 573 | nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, unsigned int npages) |
574 | { | 574 | { |
575 | struct nfs_inode *nfsi = NFS_I(inode); | 575 | struct nfs_inode *nfsi = NFS_I(inode); |
576 | int res = 0; | 576 | int res = 0; |
@@ -584,7 +584,7 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, unsigned long idx_st | |||
584 | return res; | 584 | return res; |
585 | } | 585 | } |
586 | #else | 586 | #else |
587 | static inline int nfs_scan_commit(struct inode *inode, struct list_head *dst, unsigned long idx_start, unsigned int npages) | 587 | static inline int nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, unsigned int npages) |
588 | { | 588 | { |
589 | return 0; | 589 | return 0; |
590 | } | 590 | } |
@@ -604,7 +604,7 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
604 | struct inode *inode = mapping->host; | 604 | struct inode *inode = mapping->host; |
605 | struct nfs_inode *nfsi = NFS_I(inode); | 605 | struct nfs_inode *nfsi = NFS_I(inode); |
606 | struct nfs_page *req, *new = NULL; | 606 | struct nfs_page *req, *new = NULL; |
607 | unsigned long rqend, end; | 607 | pgoff_t rqend, end; |
608 | 608 | ||
609 | end = offset + bytes; | 609 | end = offset + bytes; |
610 | 610 | ||
@@ -1292,7 +1292,7 @@ long nfs_sync_mapping_wait(struct address_space *mapping, struct writeback_contr | |||
1292 | { | 1292 | { |
1293 | struct inode *inode = mapping->host; | 1293 | struct inode *inode = mapping->host; |
1294 | struct nfs_inode *nfsi = NFS_I(inode); | 1294 | struct nfs_inode *nfsi = NFS_I(inode); |
1295 | unsigned long idx_start, idx_end; | 1295 | pgoff_t idx_start, idx_end; |
1296 | unsigned int npages = 0; | 1296 | unsigned int npages = 0; |
1297 | LIST_HEAD(head); | 1297 | LIST_HEAD(head); |
1298 | int nocommit = how & FLUSH_NOCOMMIT; | 1298 | int nocommit = how & FLUSH_NOCOMMIT; |
@@ -1305,10 +1305,10 @@ long nfs_sync_mapping_wait(struct address_space *mapping, struct writeback_contr | |||
1305 | idx_start = wbc->range_start >> PAGE_CACHE_SHIFT; | 1305 | idx_start = wbc->range_start >> PAGE_CACHE_SHIFT; |
1306 | idx_end = wbc->range_end >> PAGE_CACHE_SHIFT; | 1306 | idx_end = wbc->range_end >> PAGE_CACHE_SHIFT; |
1307 | if (idx_end > idx_start) { | 1307 | if (idx_end > idx_start) { |
1308 | unsigned long l_npages = 1 + idx_end - idx_start; | 1308 | pgoff_t l_npages = 1 + idx_end - idx_start; |
1309 | npages = l_npages; | 1309 | npages = l_npages; |
1310 | if (sizeof(npages) != sizeof(l_npages) && | 1310 | if (sizeof(npages) != sizeof(l_npages) && |
1311 | (unsigned long)npages != l_npages) | 1311 | (pgoff_t)npages != l_npages) |
1312 | npages = 0; | 1312 | npages = 0; |
1313 | } | 1313 | } |
1314 | } | 1314 | } |