projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Streamline generic_file_* interfaces and filemap cleanups
[cascardo/linux.git]
/
mm
/
swapfile.c
diff --git
a/mm/swapfile.c
b/mm/swapfile.c
index
f1f5ec7
..
a15def6
100644
(file)
--- a/
mm/swapfile.c
+++ b/
mm/swapfile.c
@@
-1723,13
+1723,14
@@
get_swap_info_struct(unsigned type)
*/
int valid_swaphandles(swp_entry_t entry, unsigned long *offset)
{
*/
int valid_swaphandles(swp_entry_t entry, unsigned long *offset)
{
- int ret = 0, i = 1 << page_cluster;
+ int our_page_cluster = page_cluster;
+ int ret = 0, i = 1 << our_page_cluster;
unsigned long toff;
struct swap_info_struct *swapdev = swp_type(entry) + swap_info;
unsigned long toff;
struct swap_info_struct *swapdev = swp_type(entry) + swap_info;
- if (!
page_cluster)
/* no readahead */
+ if (!
our_page_cluster)
/* no readahead */
return 0;
return 0;
- toff = (swp_offset(entry) >>
page_cluster) <<
page_cluster;
+ toff = (swp_offset(entry) >>
our_page_cluster) << our_
page_cluster;
if (!toff) /* first page is swap header */
toff++, i--;
*offset = toff;
if (!toff) /* first page is swap header */
toff++, i--;
*offset = toff;