aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 5cc90a40b3c5..58307853fb4a 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -494,16 +494,16 @@ static inline unsigned int ocfs2_page_index_to_clusters(struct super_block *sb,
494/* 494/*
495 * Find the 1st page index which covers the given clusters. 495 * Find the 1st page index which covers the given clusters.
496 */ 496 */
497static inline unsigned long ocfs2_align_clusters_to_page_index(struct super_block *sb, 497static inline pgoff_t ocfs2_align_clusters_to_page_index(struct super_block *sb,
498 u32 clusters) 498 u32 clusters)
499{ 499{
500 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; 500 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits;
501 unsigned long index = clusters; 501 pgoff_t index = clusters;
502 502
503 if (PAGE_CACHE_SHIFT > cbits) { 503 if (PAGE_CACHE_SHIFT > cbits) {
504 index = clusters >> (PAGE_CACHE_SHIFT - cbits); 504 index = (pgoff_t)clusters >> (PAGE_CACHE_SHIFT - cbits);
505 } else if (PAGE_CACHE_SHIFT < cbits) { 505 } else if (PAGE_CACHE_SHIFT < cbits) {
506 index = clusters << (cbits - PAGE_CACHE_SHIFT); 506 index = (pgoff_t)clusters << (cbits - PAGE_CACHE_SHIFT);
507 } 507 }
508 508
509 return index; 509 return index;