Skip to content
Snippets Groups Projects
Commit 777cefdf authored by Pravin Shelar's avatar Pravin Shelar
Browse files

b=15134

i=nikita.danilov
i=h.huang
	use unsigned long index for  radix tree lookup
parent 80ea6583
No related branches found
No related tags found
No related merge requests found
...@@ -145,8 +145,8 @@ static inline void ll_dir_chain_fini(struct ll_dir_chain *chain) ...@@ -145,8 +145,8 @@ static inline void ll_dir_chain_fini(struct ll_dir_chain *chain)
{ {
} }
static inline __u32 hash_x_index(__u32 value) static inline unsigned long hash_x_index(unsigned long value)
{ {
return ((__u32)~0) - value; return ~0UL - value;
} }
#endif #endif
...@@ -132,8 +132,8 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page) ...@@ -132,8 +132,8 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page)
return rc; return rc;
} }
static cfs_page_t *llu_dir_read_page(struct inode *ino, __u32 hash, static cfs_page_t *llu_dir_read_page(struct inode *ino, __u64 hash,
int exact, struct ll_dir_chain *chain) int exact, struct ll_dir_chain *chain)
{ {
cfs_page_t *page; cfs_page_t *page;
int rc; int rc;
......
...@@ -221,7 +221,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 hash, ...@@ -221,7 +221,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 hash,
* radix_tree_gang_lookup() can be used to find a page with starting * radix_tree_gang_lookup() can be used to find a page with starting
* hash _smaller_ than one we are looking for. * hash _smaller_ than one we are looking for.
*/ */
unsigned long offset = hash_x_index((__u32)hash); unsigned long offset = hash_x_index((unsigned long)hash);
struct page *page; struct page *page;
int found; int found;
...@@ -345,7 +345,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, int exact, ...@@ -345,7 +345,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, int exact,
} }
} }
page = read_cache_page(mapping, hash_x_index((__u32)hash), page = read_cache_page(mapping, hash_x_index((unsigned long)hash),
(filler_t*)mapping->a_ops->readpage, NULL); (filler_t*)mapping->a_ops->readpage, NULL);
if (IS_ERR(page)) if (IS_ERR(page))
GOTO(out_unlock, page); GOTO(out_unlock, page);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment