Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126229
b: refs/heads/master
c: 858a299
h: refs/heads/master
i:
  126227: ea09eec
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Jan 6, 2009
1 parent fa060c4 commit e262676
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c60aa176c6de82703f064082b909496fc4fee956
refs/heads/master: 858a29900ea2d639759e697be901a60b759cdcfb
4 changes: 2 additions & 2 deletions trunk/mm/swapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int discard_swap(struct swap_info_struct *si)

list_for_each_entry(se, &si->extent_list, list) {
sector_t start_block = se->start_block << (PAGE_SHIFT - 9);
pgoff_t nr_blocks = se->nr_pages << (PAGE_SHIFT - 9);
sector_t nr_blocks = (sector_t)se->nr_pages << (PAGE_SHIFT - 9);

if (se->start_page == 0) {
/* Do not discard the swap header page! */
Expand Down Expand Up @@ -133,7 +133,7 @@ static void discard_swap_cluster(struct swap_info_struct *si,
start_page < se->start_page + se->nr_pages) {
pgoff_t offset = start_page - se->start_page;
sector_t start_block = se->start_block + offset;
pgoff_t nr_blocks = se->nr_pages - offset;
sector_t nr_blocks = se->nr_pages - offset;

if (nr_blocks > nr_pages)
nr_blocks = nr_pages;
Expand Down

0 comments on commit e262676

Please sign in to comment.